Video encoding and decoding apparatus

ABSTRACT

An encoding apparatus includes an encoder for encoding an alpha-map signal for discriminating a background from an object of an input picture in motion compensation prediction (MV)+transform encoding which uses MV in a domain of each of N×N transform coefficients (n), a transform circuit for transforming Pf into  n  in accordance with the alpha-map signal, an inverse transform circuit for reconstructing Pf by inversely transforming  n  in accordance with the alpha-map signal, a selector for obtaining a motion compensation prediction value (p) in the mth layer (m=2 to M) by switching  p  in the mth layer and  p  in the (m−1)th layer for each  n , the selector selecting  p  in the mth layer for  n  by which a quantized output (Q) in the (m−1)th layer is 0 and selecting  p  in the (m−1)th layer for  n  by which Q=1 or more, an adder for calculating a difference df between a prediction error signal in the mth layer and a dequantized output in the (m− 1 )th layer, and an encoder for encoding and outputting the quantized signal of df. This encoding apparatus realizes SNR scalability in M layers.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] The present invention relates to video encoding and decoding apparatuses for encoding a picture signal at a high efficiency and transmitting or storing the encoded signal and, more particularly, to video encoding and decoding apparatuses with a scalable function capable of scalable coding by which the resolution and the image quality can be changed into multiple layers.

[0003] 2. Description of the Related Art

[0004] Generally, a picture signal is compression-encoded before being transmitted or stored because the signal has an enormous amount of information. To encode a picture signal at a high efficiency, pictures whose unit is a frame are divided into a plurality of blocks in units of a predetermined number of pixels. Orthogonal transform is performed for each block to separate the spacial frequency of a picture into frequency components. Each frequency component is obtained as a transform coefficient and encoded.

[0005] As one function of video encoding, a scalability function is demanded by which the image quality (SNR: Signal to Noise Ratio), the spacial resolution, and the time resolution can be changed step by step by partially decoding a bit stream.

[0006] The scalability function is incorporated into Video Part (IS13818-2) of MPEG2 which is standardized in ISO/IEC.

[0007] This scalability is realized by hierarchical encoding methods. The scalability includes an encoder and a decoder of SNR scalability and also includes an encoder and a decoder of spacial scalability.

[0008] In the encoder, layers are divided into a base layer (lower layer) whose image quality is low and an enhancement layer (upper layer) whose image quality is high.

[0009] In the base layer, data is encoded by MPEG1 or MPEG2. In the enhancement layer, the data encoded by the base layer is reconstructed and the reconstructed base layer data is subtracted from the enhancement layer data. Only the resulting error is quantized by a quantization step size smaller than the quantization step size in the base layer and encoded. That is, the data is more finely quantized and encoded. The resolution can be increased by adding the enhancement layer information to the base layer information, and this makes the transmission and storage of high-quality pictures feasible.

[0010] As described above, pictures are divided into the base layer and the enhancement layer, data encoded by the base layer is reconstructed, the reconstructed data is subtracted from the original data, and only the resulting error is quantized by a quantization step size smaller than the quantization step size in the base layer and encoded. Consequently, pictures can be encoded and decoded at a high resolution. This technique is called SNR scalability.

[0011] In the encoder, an input picture is supplied to the base layer and the enhancement layer. In the base layer, the input picture is so processed as to obtain an error from a motion compensation prediction value obtained from a picture of the previous frame, and the error is subjected to orthogonal transform (DCT). The transform coefficient is quantized and variable-length-decoded to obtain a base layer output. The quantized output is dequantized, subjected to inverse DCT, and added with the motion compensation prediction value of the previous frame, thereby obtaining a frame picture. Motion compensation prediction is performed on the basis of this frame picture to obtain the motion compensation prediction value of the previous frame.

[0012] In the enhancement layer, on the other hand, the input picture is delayed until the prediction value is obtained from the base layer, and processing is performed to obtain an error from a motion compensation prediction value in the enhancement layer obtained from the picture of the previous frame. The error is then subjected to orthogonal transform (DCT), and the transform coefficient is corrected by using the dequantized output from the base layer, quantized, and variable-length-decoded, thereby obtaining an enhancement layer output. The quantized output is dequantized, added with the motion compensation prediction value of the previous frame obtained in the base layer, and subjected to inverse DCT. A frame picture is obtained by adding to the result of the inverse DCT the motion compensation prediction value of the previous frame obtained in the enhancement layer. Motion compensation prediction is performed on the basis of this frame picture to obtain a motion compensation prediction value of the previous frame in the enhancement layer.

[0013] In this way, video pictures can be encoded by using the SNR scalability. Note that although this SNR scalability is expressed by two layers, various SNR reconstructed pictures can be obtained by increasing the number of layers.

[0014] In the decoder, the variable-length decoded data of the enhancement layer and the variable-length encoded data of the base layer which are separately supplied are separately variable-length-decoded and dequantized. The two dequantized data are added, and the result is subjected to inverse DCT. The picture signal is restored by adding the motion compensation prediction value of the previous frame to the result of the inverse DCT. Also, motion compensation prediction is performed on the basis of a picture in an immediately previous frame obtained from the restored picture signal, thereby obtaining a motion compensation prediction value of the previous frame.

[0015] The foregoing are examples of encoding and decoding using the SNR scalability.

[0016] On the other hand, the spacial scalability is done on the basis of the spacial resolution, and encoding is separately performed in a base layer whose spacial resolution is low and an enhancement layer whose spacial resolution is high. In the base layer, encoding is performed by using a normal MPEG2 encoding method. In the enhancement layer, up-sampling (in which a high-resolution picture is formed by adding pixels such as average values between pixels of a low-resolution picture) is performed for the picture from the base layer to thereby form a picture having the same size as the enhancement layer. Prediction is adaptively performed on the basis of motion compensation prediction using the picture of the enhancement layer and motion compensation prediction using the up-sampled picture. Consequently, encoding can be performed at a high efficiency.

[0017] The spacial scalability exists in order to achieve backward compatibility by which, for example, a portion of a bit stream of MPEG2 can be extracted and decoded by MPEG1. That is, the spacial scalability is not a function capable of reconstructing pictures with various resolutions (reference: “Special Edition MPEG”, Television Magazine, Vol. 49, No. 4, pp. 458-463, 1995).

[0018] More specifically, the video encoding technology of MPEG2 aims to accomplish high-efficiency encoding of high-quality pictures and high-quality reconstruction of the encoded pictures. In this technology, pictures faithful to encoded pictures can be reconstructed.

[0019] Unfortunately, with the spread of multimedia, there is a demand for a reconstructing apparatus capable of fully decoding data of high-quality pictures encoded at a high efficiency, as a system on the reconstruction side. In addition, there are demands for a system such as a portable system which is only required to reconstruct pictures regardless of whether the image quality is high, and for a simplified system by which the system price is decreased.

[0020] To meet these demands, a picture is divided into, e.g., 8×8 pixel matrix blocks and DCT is performed in units of blocks. In this case, 8×8 transform coefficients are obtained. Although it is originally necessary to decode the data from the first low frequency component to the eighth low frequency component, the data is decoded from the first low frequency component to the fourth low frequency component or from the first low frequency component to the sixth low frequency component. In this manner decoding is simplified by restoring the picture by reconstructing the signal of 4×4 resolution or the signal of 6×6 resolution, rather than the signal of 8×8 resolution.

[0021] Unfortunately, when a picture which originally has 8×8 information is restored by using 4×4 or 6×6 information, a mismatch occurs between the restored value and the motion compensation prediction value, and errors are accumulated. This significantly degrades the picture. Therefore, it is an important subject to overcome this mismatch between the encoding side and the decoding side.

[0022] Note that as a method of converting the spacial resolution in order to control the difference between the spacial resolutions on the encoding side and the decoding side, there is another method, although the method is not standardized, by which the spacial resolution is made variable by inversely converting some coefficients of orthogonal transform (e.g., DCT (Discrete Cosine Transform)) by an order smaller than the original order.

[0023] Unfortunately, when motion compensation prediction is performed by using the resolution-converted picture, image quality degradation called a draft resulting from the motion compensation prediction occurs in the reconstructed picture (reference: Iwahashi et al., “Motion Compensation for Reducing Drift in Scalable Decoder”, Shingaku Giho IE94-97, 1994).

[0024] Accordingly, the method has a problem as a technique to overcome the mismatch between the encoding side and the decoding side.

[0025] On the other hand, the spacial scalability exists in order to achieve backward compatibility by which, for example, a portion of a bit stream of MPEG2 can be extracted and decoded by MPEG1. That is, the spacial scalability is not a function of capable of reconstructing pictures with various resolutions (reference: “Special Edition MPEG”, Television Magazine, Vol. 49, No. 4, pp. 458-463, 1995). Since hierarchical encoding is performed to realize the scalability function as described above, information is divisionally encoded and this decreases the coding efficiency.

[0026] A video encoding system belonging to a category called mid-level encoding is proposed in “J. Y. A. Wang et. al., “Applying Mid-level vision Techniques for Video Data Compression and Manipulation”, M.I.T. Media Lab. Tech. Report No. 263, February 1994”.

[0027] In this system, a background and an object are separately encoded. To separately encode the background and the object, an alpha-map signal which represents the shape of the object and the position of the object in a frame is necessary. An alpha-map signal of the background can be uniquely obtained from the alpha-map signal of the object.

[0028] In an encoding system like this, a picture with an arbitrary shape must be encoded. As a method of encoding an arbitrary-shape picture, there is an arbitrary-shape picture signal orthogonal transform method described in previously filed Japanese Patent Application No. 7-97073. In this orthogonal transform method, the values of pixels contained in a specific domain are separated from an input edge block signal by a separation circuit (SEP), and an average value calculation circuit (AVE) calculates an average value a of the separated pixel values.

[0029] If an alpha-map indicates a pixel in the specific domain, a selector (SEL) outputs the pixel value in the specific domain stored in a block memory (MEM). If the alpha-map indicates another pixel, the selector outputs the average value a. The block signal thus processed is subjected to two-dimensional DCT to obtain transform coefficients for pixels in the specific domain.

[0030] On the other hand, inverse transform is accomplished by separating the pixel values in the specific domain from pixel values in the block obtained by performing inverse DCT for the transform coefficient.

[0031] As described above, in the scalable encoding method capable of dividing pictures into multiple layers, the coding efficiency is sometimes greatly decreased when video pictures are encoded. In addition, scalable encoding by which the resolution and the image quality can be made variable is also required in an arbitrary-shape picture encoding apparatus which separately encodes the background and the object. It is also necessary to improve the efficiency of motion compensation prediction encoding for an arbitrary-shape picture.

[0032] On the other hand, the mid-level encoding system has the advantage that a method of evenly arranging the internal average value of the object in the background can be realized with a few calculations. However, a step of pixel values is sometimes formed in the boundary between the object and the background. If DCT is performed in a case like this, a large quantity of high-frequency components are generated and so the amount of codes is not decreased.

SUMMARY OF THE INVENTION

[0033] It is an object of the present invention to provide an encoding apparatus and a decoding apparatus capable of improving the coding efficiency when video pictures are encoded by a scalable encoding method by which pictures can be divided into multiple layers.

[0034] It is another object of the present invention to provide a scalable encoding apparatus and a scalable decoding apparatus capable of mating the resolution and the image quality variable and improving the coding efficiency in an arbitrary-shape picture encoding apparatus which separately encodes a background and an object.

[0035] It is still another object of the present invention to improve the efficiency of motion compensation prediction encoding for arbitrary-shape pictures.

[0036] It is still another object of the present invention to alleviate the drawback that the code amount is not decreased due to the generation of a large quantity of high-frequency components when DCT is performed, even if a step of pixel values is formed in the boundary between an object and a background when a method of evenly arranging an internal average value of the object in the background is used.

[0037] According to the present invention, there is provided a video encoding apparatus comprising: an orthogonal transform circuit for orthogonally transforming an input picture signal to obtain a plurality of transform coefficients; a first local decoder for outputting first transform coefficients for a fine motion compensation prediction picture on the basis of a previous picture; a second local decoder for outputting second transform coefficients for a coarse motion compensation prediction picture on the basis Df a current picture corresponding to the input picture signal; means for detecting a degree of motion compensation prediction in the second local decoder; a selector for selectively outputting the first and second transform coefficients in accordance with the degree of motion compensation prediction; a first calculator for calculating a difference between the transform coefficients of the orthogonal transform circuit and ones of the first and second transform coefficients which are selected by the selector, and outputting a motion compensation prediction error signal; a first quantizer for quantizing the motion compensation prediction error signal from the first adder and outputting a first quantized motion compensation prediction error signal; a second calculator for calculating a difference between the second transform coefficients from the second local decoder and the transform coefficients from the orthogonal transform circuit, and outputting a second motion compensation prediction error signal; a second quantizer for quantizing the motion compensation prediction error signal from the second calculator, and outputting a second quantized motion compensation prediction error signal; and an encoder for encoding the first and second quantized motion compensation prediction error signals and outputting encoded signals.

[0038] According to the present invention, there is provided a video encoding apparatus comprising: an orthogonal transform circuit for dividing an input video signal into a plurality of blocks each containing N×N pixels and orthogonally transforming the input video signal in units of blocks to obtain a plurality of transform coefficients divided in spacial frequency bands; a first motion prediction processing section for performing motion compensation prediction processing for the plurality of transform coefficients in order to obtain an upper-layer motion compensation prediction signal having the number of data enough to obtain a high image quality; a second motion prediction processing section for performing motion compensation prediction processing for the plurality of transform coefficients in order to obtain a lower-layer motion compensation prediction signal upon reducing the number of data; a decision section for deciding in motion compensation on the basis on the lower-layer motion compensation prediction signal whether motion compensation prediction is correct; a selector for selecting the upper-layer motion compensation prediction signal in response to a decision representing a correct motion compensation prediction from the decision section, and the lower-layer motion compensation prediction signal in response to a decision representing an incorrect motion compensation predict on; and an encoder for encoding one of the upper-layer motion compensation prediction signal and the lower-layer motion compensation prediction signal which is selected by the selector.

[0039] According to the present invention, there is provided a video encoding apparatus for realizing SNR scalability in M layers, comprising: an orthogonal transform circuit for dividing an input video signal into a plurality of blocks each containing N×N pixels and orthogonally transforming the input video signal in units of blocks to obtain a plurality of transform coefficients divided in spacial frequency bands; a first motion compensation prediction processing section for performing motion compensation prediction processing for the plurality of transform coefficients in order to obtain an mth-layer (m=2 to M) motion compensation prediction signal; a second motion compensation prediction processing section for performing motion compensation prediction processing for the plurality of transform coefficients in order to obtain an (m−1)th-layer motion compensation prediction signal; switching means for selecting the mth-layer motion compensation prediction signal of the first motion compensation prediction processing section in order to obtain an mth-layer prediction value when a quantized output from the second motion compensation prediction processing section is 0, and switching between the mth-layer motion compensation prediction signal and the (m−1)th-layer motion compensation prediction signal in units of transform coefficients in order to select the (m−1)th-layer motion compensation prediction signal when the quantized output is not less than 1; means for calculating a difference signal between an (m−1)th-layer dequantized output from the second motion compensation prediction processing section and an mth-layer motion compensation prediction error signal obtained by a difference between the mth-layer motion compensation prediction signal and the transform coefficient from the orthogonal transform circuit; and encoding means for quantizing and encoding the difference signal to output an encoded bit stream.

[0040] According to the present invention, there is provided a video encoding/decoding system comprising: a video encoding apparatus for realizing SNR (Signal to Noise Ratio) scalability in M layers, which includes an orthogonal transform circuit for dividing an input video signal into a plurality of blocks each containing N×N pixels and orthogonally transforming the input video signal in units of blocks to obtain a plurality of transform coefficients divided in spacial frequency bands, a first motion compensation prediction processing section for performing motion compensation prediction processing for the plurality of transform coefficients in order to obtain an mth-layer (m=2 to M) notion compensation prediction signal, a second motion compensation prediction processing section for performing motion compensation prediction processing for the plurality of transform coefficients in order to obtain an (m−1)th-layer motion compensation prediction signal, switching means for selecting the mth-layer motion compensation prediction signal of the first motion compensation prediction processing section in order to obtain an mth-layer prediction value when a quantized output from the second motion compensation prediction processing section is 0, and switching between the mth-layer motion compensation prediction signal and the (m−1)th-layer motion compensation prediction signal in units of transform coefficients in order to select the (m−1)th-layer motion compensation prediction signal when the quantized output is not less than 1, means for calculating a difference signal between an (m−1)th-layer dequantized output from the second motion compensation prediction processing section and an mth-layer motion compensation prediction error signal obtained by a difference between the mth-layer motion compensation prediction signal and the transform coefficient from the orthogonal transform circuit, and encoding means for quantizing and encoding the difference signal to output an encoded bit stream; and a video decoding apparatus which includes means for extracting codes up to a code in the mth (m=2 to M) layer from the encoded bit stream from the video encoding apparatus, decoding means for decoding the codes of respective layers up to the mth layer, dequantization means for dequantizing, in the respective layers, the quantized values decoded by the decoding means, switching means for switching the mth-layer (m=2 to M) motion compensation prediction value and the (m−1)th-layer motion compensation prediction value in units of transform coefficients, and outputting the mth-layer motion compensation prediction value for the quantized output of 0 in the (m−1)th layer and the (m−1)th-layer motion compensation prediction value for the quantized output of not less than 1 in the (m−1)th layer in units of transform coefficients in order to obtain the mth-layer prediction value, and means for adding the mth-layer motion compensation prediction value and the (m−1)th-layer motion compensation prediction value to reconstruct the mth-layer motion compensation prediction error signal.

[0041] According to the present invention, there is provided a video encoding apparatus comprising: an orthogonal transform circuit for dividing an input video signal into a plurality of blocks each containing N×N pixels and orthogonally transforming an arbitrary-shape picture in units of blocks to obtain a plurality of transform coefficients; means for encoding and outputting an alpha-map signal for discriminating a background of a picture from an object thereof; means for calculating an average value of pixel values of an object portion using the alpha-map signal in units of blocks; means for assigning the average value to a background portion of the block; means for deciding using the alpha-map signal whether a pixel in the object is close to the background; means for compressing, about the average value, the pixel in the object decided to be close to the background; and means for orthogonally transforming each block to output an orthogonal transform coefficient.

[0042] Additional objects and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objects and advantages of the invention may be realized and obtained by means of the instrumentalities and combinations particularly pointed out in the appended claims.

BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate presently preferred embodiments of the invention and, together with the general description given above and the detailed description of the preferred embodiments given below, serve to explain the principles of the invention.

[0044]FIG. 1 is a block diagram for explaining the present invention, showing the configuration of an encoding apparatus according to the first embodiment of the present invention;

[0045]FIG. 2 is a view for explaining the present invention, which explains a prediction value switching method to be applied to the present invention;

[0046]FIGS. 3A and 3B are block diagrams for explaining the present invention, showing the configurations of motion compensation prediction sections according to the first embodiment of the present invention;

[0047]FIG. 4 is a block diagram for explaining the present invention, showing the configuration of a decoding apparatus according to the first embodiment of the present invention;

[0048]FIG. 5 is a block diagram for explaining the present invention, showing the configuration of an encoding apparatus according to the second embodiment of the present invention;

[0049]FIGS. 6A and 6B are block diagrams for explaining the present invention, showing the configurations of motion compensation prediction sections according to the second embodiment of the present invention;

[0050]FIG. 7 is a block diagram for explaining the present invention, showing the configuration of a decoding apparatus according to the second embodiment of the present invention;

[0051]FIGS. 8A and 8B are block diagrams for explaining the present invention, showing the configurations of motion compensation prediction sections according to the third embodiment of the present invention;

[0052]FIG. 9 is a view for explaining the present invention, which illustrates an example of a quantization matrix used in the present invention;

[0053]FIG. 10 is a view for explaining the present invention, which illustrates an example of a quantization matrix used in the present invention;

[0054]FIG. 11 shows an example of a quantization matrix obtained for the example shown in FIG. 2;

[0055]FIG. 12 shows an example of a two-dimensional matrix which is divided into eight portions in each of a horizontal direction (h) and a vertical direction (v);

[0056]FIG. 13 shows a scan order for the example shown in FIG. 2;

[0057]FIG. 14 is a view for explaining the present invention, which explains the fourth embodiment of the present invention;

[0058]FIGS. 15A, 15B, and 15C are views for explaining an example of a video transmission system to which the video encoding apparatus and the video decoding apparatus according to the present invention are applied;

[0059]FIG. 16 is a view for explaining a modification of the second embodiment of the present invention, which is a graph showing an example in which an average value is arranged in a background;

[0060]FIG. 17 is a view for explaining another modification of the second embodiment of the present invention, which is a graph for explaining an example in which a step is decreased;

[0061]FIG. 18 is a view for explaining still another modification of the second embodiment of the present invention, which illustrates examples of block pixel values;

[0062]FIG. 19 is a view for explaining still another modification of the second embodiment of the present invention, which is a graph for explaining another example in which a step is decreased;

[0063]FIG. 20 is a view for explaining still another modification of the second embodiment of the present invention, which illustrates examples of block pixel values;

[0064]FIG. 21 is a block diagram showing an example of an encoding apparatus as still another modification of the second embodiment of the present invention; and

[0065]FIG. 22 is a block diagram showing an example of a decoding apparatus as still another modification of the second embodiment of the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0066] In the present invention, when motion compensation is to be performed in a transform coefficient domain in units of N×N transform coefficients, encoding in an upper layer (enhancement layer) is performed on the basis of an already decoded and quantized value of a lower layer (base layer). This realizes an encoding system which can perform encoding with little decrease in the encoding coefficient.

[0067] Also, in the above encoding apparatus of the present invention, orthogonal transform can be performed for a picture domain with an arbitrary shape in accordance with an alpha-map signal indicating the arbitrary-shape picture domain. Consequently, a reconstructed picture with a variable image quality can be obtained for an arbitrary-shape picture.

[0068] In the present invention, a frame memory is prepared for each of a background and one or more objects, and motion compensation prediction is performed for each of the background and the objects. This improves the efficiency of prediction for a portion hidden by overlapping of the objects.

[0069] Furthermore, the efficiency of motion compensation predictive encoding is improved by decreasing the range of motion vector detection in the boundary of an object.

[0070] Embodiments of the present invention will be described below with reference to the accompanying drawings.

[0071] The first embodiment of the present invention will be described with reference to FIGS. 1, 2, 3A, 3B, and 4. This embodiment is related to an encoding apparatus and a decoding apparatus which realize SNR scalability of M layers as a whole. The coding efficiency in the mth layer is improved by adaptively switching a motion compensation prediction signal in the mth layer and a motion compensation prediction signal in the (m−1)th layer. In the accompanying drawings, a base layer corresponds to the (m−1)th layer and an enhancement layer corresponds to the mth layer.

[0072] In the encoding apparatus shown in FIG. 1, an input signal is input to an orthogonal transform circuit, e.g., DCT circuit 100. The output terminal of the DCT circuit is connected to the input terminals of adders 110 and 111. The other input terminal of the adder 110 is connected to a selector 300. The output terminal of the adder 110 is connected to a quantizer 130 via an adder 120. The output terminal of the quantizer 140 is connected to an output buffer 160 via a variable-length encoder 140 and a multiplexer 150.

[0073] The output terminal of the quantizer 130 is connected to a motion compensation prediction section (MCP) 200 via a dequantizer 170 and adders 180 and 190. The output of the motion compensation prediction section 200 is connected selectively to the adders 110 and 120 by the selector 300. The encoding controller 400 controls the quantizer 130 and the variable-length encoder 140 in accordance with the output signal from the output buffer 160.

[0074] The output terminal of the adder 111 is connected to the input terminal of the quantizer 131 the output terminal of which is connected to is connected to the output buffer 161 via a variable-length encoder 141 and a multiplexer 151.

[0075] The output terminal of the quantizer 131 is connected to a motion compensation prediction section 201 of the enhancement layer via a dequantizer 171 and an adder 191. The output terminal of the motion compensation prediction section 201 is connected to the selector 300 and adders 111 and 191. The encoding controller 410 controls the quantizer 131 and the variable-length encoder 141 in accordance with the output signal from the output buffer 161. A motion vector detector 500 receives the input video signal 10 and is connected to the motion compensation prediction section 200, motion compensation prediction section 201 and variable-length encoder 141.

[0076] The DCT circuit 100 performs orthogonal transform (DCT) for an input picture signal 10 to obtain transform coefficients of individual frequency components. The adder 110 calculates the difference between the transform coefficient from the DCT circuit 100 and one of an output (EMC) from the enhancement layer motion compensation prediction section 200 and an output (BMC) from the base layer motion compensation prediction section 201 which are selectively supplied via the selector 300. The adder 120 calculates the difference between an output from the adder 110 and an output from the dequantizer 171.

[0077] The quantizer 130 quantizes an output from the adder 120 in accordance with a quantization scale supplied from the encoding controller 400. The variable-length encoder 140 performs variable-length encoding for the quantized output from the quantizer 130 and side information such as the quantization scale supplied from the encoding controller 400.

[0078] The multiplexer 150 multiplexes the variable-length code of the quantized output and the variable-length code of the side information supplied from the variable-length encoder 140. The output buffer 160 temporarily holds and outputs the data stream multiplexed by the multiplexer 150.

[0079] The encoding controller 400 outputs information of an optimum quantization scale Q_scale on the basis of buffer capacity information from the buffer 160. The encoding controller 400 also supplies this information of the quantization scale Q_scale to the variable-length encoder 140 as the side information, thereby causing the quantizer 130 to perform quantization and the variable-length encoder 140 to perform variable-length encoding.

[0080] The dequantizer 170 dequantizes the quantized output from the quantizer 130 and outputs the result. The adder 180 adds the output from the dequantizer 170 and the output from the dequantizer 171. The adder 190 adds the output from the adder 180 and a compensation prediction value selectively output from the selector 300.

[0081] The motion compensation prediction section 200 calculates a motion compensation prediction value in the enhancement layer on the basis of the output from the adder 180 and a motion vector detected by the motion vector detector 500. When receiving the motion compensation prediction value calculated by the motion compensation prediction section 200 and the motion compensation prediction value calculated by the motion compensation prediction section 201, the selector 300 selectively outputs one of these motion compensation prediction values in accordance with an output from a binarizing circuit 310.

[0082] In the above configuration, the adder 110, the adder 120, the quantizer 130, the variable-length encoder 140, the multiplexer 150, the output buffer 160, the dequantizer 170, the adder 180, the adder 190, the motion compensation prediction section 200, the selector 300, and the encoding controller 400 constitute the enhancement layer. The quantizer 170, the adder 180, the adder 190 and the motion compensation prediction section 200 construct a local decoder of the enhancement layer.

[0083] The motion vector detector 500 described above receives the same picture signal as the input picture signal to the DCT circuit 100 and detects a motion vector from this picture signal. On the basis of the motion vector supplied from the motion vector detector 500 and the sum output from the adder 191, the motion compensation prediction section 201 performs motion compensation prediction and obtains a motion compensation prediction value (BMC) which is converted into a DCT coefficient.

[0084] The adder 111 calculates the difference between the output transform coefficient from the DCT circuit 100 and the output motion compensation prediction value (BMC) from the motion compensation prediction section 201. The quantizer 131 quantizes the output from the adder 111 in accordance with the quantization scale designated by the encoding controller 410.

[0085] The binarizing circuit 310 checks whether the quantized value output from the quantizer 131 is “0”. If the value is “0”, the binarizing circuit 310 outputs “0”. If the value is not “0”, the binarizing circuit 310 outputs “1”. The dequantizer 171 performs dequantization in accordance with the quantization scale designated by the encoding controller 410. The adder 191 adds the output from the dequantizer 171 and the output from the motion compensation prediction section 201 and supplies the sum to the motion compensation prediction section 201.

[0086] The variable-length encoder 141 performs variable-length encoding for the quantized output from the quantizer 131 and the side information such as the quantization scale supplied from the encoding controller 410. The multiplexer 151 multiplexes the variable-length code of the quantized output and the variable-length code of the side information supplied from the variable-length encoder 141. The output buffer 161 temporarily holds and outputs the data stream multiplexed by the multiplexer 151.

[0087] The encoding controller 410 outputs the information of the optimum quantization scale Q_scale on the basis of buffer capacity information from the buffer 161. The encoding controller 410 also supplies this information of the quantization scale Q_scale to the variable-length encoder 141 as the side information, thereby causing the quantizer 131 to perform quantization and the variable-length encoder 141 to perform variable-length encoding.

[0088] The adder 111, the quantizer 131, the variable-length encoder 141, the multiplexer 151, the output buffer 161, the dequantizer 171, the adder 191, the mot-ion compensation prediction section 201, the binarizing circuit 310, the encoding controller 410, and the motion vector detector 500 constitute the base layer. The dequantizer 171, the adder 191 and the motion compensation prediction section 201 constitute a local decoder.

[0089] This apparatus with the above configuration operates as follows.

[0090] The input picture signal 10 is supplied to the DCT circuit 100 and the motion vector detector 500. The motion vector detector 500 detects a motion vector from the picture signal 10 and supplies the detected vector to the motion compensation prediction sections 200 and 201 and the variable-length encoder 141.

[0091] The picture signal 10 input to the DCT circuit 100 is divided into blocks each having a size of N×N pixels and orthogonally transformed in units of N×N pixels by this DCT circuit 100. Consequently, N×N transform coefficients are obtained for each block. These transform coefficients are N×N transform coefficients obtained by separating the spacial frequency components of the picture into components ranging from a DC component to individual AC components.

[0092] These N×N transform coefficients obtained by the DCT circuit 100 are supplied to the adder 110 in the enhancement layer and the adder 111 in the base layer.

[0093] In the base layer, the adder 111 calculates the difference between the transform coefficient and the motion compensation prediction value (BMC) which is converted into a DCT coefficient and supplied from the motion compensation prediction section 201, thereby obtaining a prediction error signal. This prediction error signal is supplied to the quantizer 131 to be quantized in accordance with the quantization scale Q_scale input by the encoding controller 410. The quantized prediction error signal is supplied to the variable-length encoder 141 and dequantizer 171.

[0094] The variable-length encoder 141 performs variable-length encoding for the quantized prediction error signal, the side information such as the quantization size supplied from the encoding controller 410, and the motion vector information supplied from the motion vector detector 500. This variable-length-encoded output is supplied to the multiplexer 151 to be multiplexed thereby, and supplied to the output buffer 161. The output buffer 161 outputs the multiplexed signal, as an encoded bit stream 21, to a transmission line or a storage medium. Also, the output buffer 161 feeds the capacity of the buffer back to the encoding controller 410.

[0095] In accordance with the capacity information from the buffer, the encoding controller 410 controls the output from the quantizer 131 and outputs the quantization scale Q_scale to the quantizer 131. This information of the quantization scale Q_scale is also supplied to the variable-length encoder 141 as the side information.

[0096] Since the encoding controller 410 controls the output from the quantizer 131 in accordance with the capacity information from the buffer, the encoding controller 410 can advance the quantization while controlling the quantization scale so that the output buffer 161 does not overflow.

[0097] The information of the quantization scale Q_scale is variable-length-encoded as the side information by the variable-length encoder 141 and multiplexed by the multiplexer 151. The multiplexed signal is used as the output from the video encoding apparatus. Consequently, the quantization scale used in dequantization when the video decoding apparatus performs decoding can be obtained.

[0098] Meanwhile, the quantized value of the prediction error signal supplied to the dequantizer 171 is dequantized and supplied to the adder 191. The adder 191 adds the dequantized value to the motion compensation prediction value BMC and thereby calculates a reconstructed value in the transform coefficient domain. This value is supplied to the motion compensation prediction section 201.

[0099] In the enhancement layer, the output EMC from the motion compensation prediction section 200 of the enhancement layer and the output BMC from the motion compensation prediction section 201 of the base layer are adaptively and selectively output for each transform coefficient. That is, on the basis of an output BQ from the quantizer 131 in the base layer, the selector 300 adaptively and selectively outputs the output (EMC) from the motion compensation prediction section 200 of the enhancement layer and the output BMC from the motion compensation prediction section 201 of the base layer for each transform coefficient in accordance with a method to be described later.

[0100] The adder 110 calculates a prediction error signal between the transform coefficient of the input picture supplied from the DCT circuit 100 and an output EP from the selector 300 and supplies the signal to the adder 120. The adder 120 calculates the difference between a signal 30 of the dequantized value BQ supplied from the dequantizer 171 and the output from the adder 110 and supplies the difference as a difference value output signal EC to the quantizer 130. This difference value output signal EC is the motion compensation prediction error signal.

[0101] The quantizer 130 quantizes the difference value output signal EC in accordance with the quantization scale Q_scale supplied from the encoding controller 400 and supplies the quantized signal to the variable-length encoder 140 and the dequantizer 170.

[0102] The variable-length encoder 140 performs variable-length encoding for the quantized motion compensation prediction error signal together with the side information and supplies the encoded signals to the multiplexer 150. The multiplexer 150 multiplexes these signals and supplies the multiplexed signal to the output buffer 160.

[0103] The output buffer 160 outputs the multiplexed signal to a transmission line or a storage medium as an encoded bit stream 20 for the enhancement layer. Also, the output buffer 160 feeds the capacity of the buffer back to the encoding controller 400.

[0104] The quantized value supplied to the dequantizer 170 is dequantized. The adder 180 adds the dequantized value to the output 30 supplied from the dequantizer 171 of the base layer, thereby reconstructing the prediction error signal.

[0105] The adder 190 adds the prediction error signal reconstructed by the adder 180 to the motion compensation prediction value EMC and thereby calculates a reconstructed value in the transform coefficient domain. This reconstructed value is supplied to the motion compensation prediction section 200.

[0106]FIG. 2 shows a switching unit described in reference (T. K. Tan et al., “A Frequency Scalable Coding Scheme Employing Pyramid and Subband Techniques”, IEEE Trans. CAS for Video Technology, Vol. 4, No. 2, April 1994), which is an example of the switching unit optimally applicable to the selector 300.

[0107] Referring to FIG. 2, the binarizing circuit 310 decides whether the value of the output BQ from the quantizer 131 in the base layer is “0”. This decision result is supplied to the selector 300. If the value of the output BQ from the quantizer 131 is “0”, the selector 300 selects the transform coefficient output EMC from the enhancement layer motion compensation prediction section 200. If the value is “1”, the selector 300 selects the transform coefficient output BMC from the base layer motion compensation prediction section 201.

[0108] That is, the binarizing circuit 310 outputs “0” when the value of the output BQ from the quantizer 131 in the base layer is “0” and outputs “1” when the value is not “0”. Therefore, the selector 300 is made to select EMC when the output from the binarizing circuit 310 is “0” and BMC when the output is “1”.

[0109] Consequently, the transform coefficient output EMC from the motion compensation prediction section 200 in the enhancement layer is applied to a transform coefficient in a position where the output BQ from the quantizer 131 is “0”, and the transform coefficient output BMC from the motion compensation prediction section 201 in the base layer is applied to a transform coefficient in a position where the output BQ from the quantizer 131 is not “0”.

[0110] The quantizer 131 in the base layer receives the output from the adder 111 and quantizes this output from the adder 111. The adder 111 receives the output from the DCT circuit 100 and the motion compensation prediction value obtained by the motion compensation prediction section 201 from a picture in an immediately previous frame, and calculates the difference between them. Therefore, if the calculated motion compensation prediction value is correct, the difference between the two values output from the adder 111 is “0”.

[0111] Accordingly, of the quantized values as the output BQ from the quantizer 131 in the base layer, coefficients (values in portions enclosed by the circles in FIG. 2) having values other than “0” are coefficients whose motion compensation prediction is incorrect.

[0112] If the motion compensation prediction section 200 performs motion compensation prediction by using the same motion vector as in the base layer supplied from the motion vector detector 500, it is estimated that motion compensation prediction for coefficients (values in portions enclosed by the circles) in the enhancement layer in the same positions as in the base layer is incorrect.

[0113] Accordingly, the selector 300 selects BMC for these coefficients.

[0114] On the other hand, it is estimated that motion compensation for other coefficients is correct. Therefore, the selector 300 selects a prediction value in the enhancement layer with a smaller encoding deviation. Consequently, the signal EC encoded in the enhancement layer is used as the quantized error signal of the base layer when motion compensation prediction is incorrect, and as the motion compensation prediction error signal of the enhancement layer when motion compensation prediction is correct. This improves the coding efficiency of coefficients whose motion compensation prediction is incorrect.

[0115] Note that the technique disclosed in the reference cited above is based on the assumption that pictures having low resolutions are reconstructed in the base layer, and so low-frequency coefficients which are 1/4 the transform coefficients calculated by the DCT circuit 100 are separated and supplied to the base layer. As a consequence, the reliability of estimation for switching prediction for each transform coefficient is decreased due to an error produced by resolution conversion.

[0116] In this embodiment, on the other hand, the resolutions of the base layer and the enhancement layer are equal. Therefore, the embodiment is different from the technique disclosed in the reference cited above in that the accuracy of estimation is improved. A great advantage of the embodiment is a high image quality.

[0117] The configuration of the notion compensation prediction sections 200 and 201 used in the apparatus of the present invention will be described below.

[0118]FIG. 3A is a block diagram showing the configuration of the motion compensation prediction sections 200 and 201. Each of the motion compensation prediction sections 200 and 201 consists of an IDCT circuit 210, a frame memory 220, a motion compensation circuit 230, and a DCT circuit 240.

[0119] The IDCT circuit 210 restores the reconstructed picture signal by performing inverse orthogonal transform (IDCT) for the output from the adder 190 or 191. The frame memory 220 holds the reconstructed picture signal obtained by this inverse orthogonal transform, as a reference picture, in units of frames. The motion compensation circuit 230 extracts a picture in a position indicated by a motion vector in units of blocks from the picture signals (reference pictures) stored in the frame memory 220. The DCT circuit 240 performs orthogonal transform (DCT) for the extracted picture and outputs the result. Note that the motion vector is supplied from the motion vector detector 500. In this configuration, a reconstructed value in a transform coefficient domain is inversely transformed into the reconstructed picture signal by the IDCT circuit 210 and stored in the frame memory 220. The motion compensation circuit 230 extracts a picture in a position indicated by the motion vector in unite of blocks from the reference pictures stored in the frame memory 220, and supplies the extracted picture to the DCT circuit 240. The DCT circuit 240 performs DCT for the supplied picture and outputs the result as a motion compensation prediction value in the DCT coefficient domain.

[0120] In this manner, the motion compensation prediction value in the DCT coefficient domain can be obtained.

[0121] The foregoing is the explanation of the encoding apparatus. The decoding apparatus will be described below.

[0122]FIG. 4 is a block diagram of the decoding apparatus according to the first embodiment of the present invention.

[0123] According to the present decoding apparatus, a buffer 162 on the enhancement layer side receives a coded bit stream sent from the encoding apparatus. The output terminal of the buffer 162 is connected to variable-length encoder 142 via a demultiplexer 152 the output terminal of which is connected to a dequantizer 172. The output terminal of the dequantizer 172 is connected to a motion compensation prediction section 202 via adders 181 and 192. The output terminal of the motion compensation prediction section 202 is connected an adder 192 via a selector 300.

[0124] The buffer 163 on the base layer side receives the encoded bit stream 23 sent from the encoding apparatus. The output terminal of the buffer 163 is connected to a variable-length decoder 143 via a segmentation circuit 153. The output terminal of the variable-length decoder 143 is connected to a motion compensation prediction section 203 via a dequantizer 173 and an adder 193 and to the switch control terminal of a selector 300 via a binarizing circuit 310. The output terminal of the motion compensation prediction section 203 is connected to an adder 193 and the selector 300.

[0125] The input buffer 162, the demultiplexer 152, the variable-length decoder 142, the dequantizer 172, the adders 181 and 192, the selector 300, and the motion compensation prediction section 202 constitute an enhancement layer. The input buffer 163, the demultiplexer 153, the variable-length decoder 143, the dequantizer 173, the adder 193, the binarizing circuit 310, and the motion compensation prediction section 203 constitute a base layer.

[0126] The input buffer 162 in the enhancement layer receives and temporarily holds an encoded multiplexed bit stream 22 in the enhancement layer. The demultiplexer 152 demultiplexes the bit stream 22 obtained via the input buffer 162, i.e., demultiplexes the multiplexed signal into the original signals, thereby restoring encoded information of side information and encoded information of a difference value output signal EC of a picture.

[0127] The variable-length decoder 142 performs variable-length decoding for the encoded signals demultiplexed by the demultiplexer 152 to thereby restore the original side information and the difference value output signal EC of the picture. On the basis of the information of a quantization scale Q_scale of the restored side information, the dequantizer 172 dequantizes the difference value output signal EC of the picture from the variable-length decoder 142 and outputs the dequantized signal. The adder 181 adds the dequantized signal and the dequantized output from the dequantizer 173 for the base layer.

[0128] The adder 192 adds the output from the adder 181 and the output EP from the selector 300 and outputs the sum. The motion compensation prediction section 202 receives the output from the adder 192 and the decoded difference value output signal EC of the picture which is the output from the variable-length decoder 143 for the base layer and obtains a motion compensation prediction value EMC. The output motion compensation prediction value EMC from the motion compensation prediction section 202 is used as an enhancement layer output 40 and as one input to the selector 300.

[0129] The selector 300 receives the output (motion compensation prediction value EMC) from the notion compensation prediction section 202 for the enhancement layer and the output from the motion compensation prediction section 203 for the base layer. In accordance with the output from the binarizing circuit 310, the selector 300 selectively outputs one of these two inputs.

[0130] The input buffer 163 receives and temporarily holds an encoded and multiplexed bit stream 23 for the base layer. The demultiplexer 153 demultiplexes the bit stream 23 obtained via the input buffer 163, i.e., demultiplexes the multiplexed signal into the original signals, thereby restoring encoded information of the side information and encoded information of the difference value output signal EC of the picture.

[0131] The variable-length decoder 143 performs variable-length decoding for the encoded signals demultiplexed by the demultiplexer 153 to thereby restore the original side information and the difference value output signal EC of the picture. On the basis of the information of the quantization scale Q_scale of the restored side information, the dequantizer 173 dequantizes the difference value output signal EC of the picture from the variable-length decoder 143 and supplies the dequantized signal to the adders 181 and 193. The adder 193 adds the dequantized signal and the motion compensation prediction value EMC supplied from the motion compensation prediction section 203 for the base layer.

[0132] The motion compensation prediction section 203 receives the output from the adder 193 and the motion compensation prediction value EMC, which is the output of an immediately previous frame from the section 203, and obtains the motion compensation prediction value EMC of the current frame. The output motion compensation prediction value EMC from the motion compensation prediction section 203 is used as an output 41 of the base layer and as the other input to the selector 300.

[0133] The operation of the decoding apparatus with the above configuration will be described below. In this apparatus, the base layer bit stream 23 is supplied to the input buffer 163 and the enhancement layer bit stream 22 is supplied to the input buffer 162.

[0134] The input base layer bit stream 23 is stored in the input buffer 163 and supplied to the demultiplexer 153. The demultiplexer 153 demultiplexes the signal in accordance with the type of the signal. That is, the bit stream 23 is formed by multiplexing signals of the side information such as the quantized value of a transform coefficient, the motion vector, and the quantization scale. Upon receiving the bit stream 23, therefore, the demultiplexer 153 demultiplexes the bit stream into the original codes such as the quantized value of the transform coefficient, the motion vector, and the quantization scale Q_scale in the side information.

[0135] The codes demultiplexed by the demultiplexer 153 are supplied to the variable-length decoder 143 and decoded into signals of the quantized value of the transform coefficient, the motion vector, and the quantization scale Q_scale. Of the decoded signals, the motion vector is supplied to the motion compensation prediction section 203, and the quantized value of the transform coefficient and the quantization scale Q_scale are supplied to the dequantizer 173. The dequantizer 173 dequantizes the quantized value of the transform coefficient in accordance with the quantization scale Q_scale and supplies the dequantized transform coefficient to the adder 193.

[0136] The adder 193 adds the dequantized transform coefficient and the motion compensation prediction value in the transform coefficient domain supplied from the motion compensation prediction section 203, thereby calculating the reconstructed value in the transform coefficient domain.

[0137] This reconstructed value is supplied to the motion compensation prediction section 203. The configuration of the motion compensation prediction section 203 is as shown in FIG. 3B. That is, the reconstructed value supplied from the adder 193 is inversely orthogonally transformed by an IDCT circuit 210 in the motion compensation prediction section 203 and output as the reconstructed picture signal 41. The signal is also stored in a frame memory 220 in the motion compensation prediction section 203.

[0138] In the motion compensation prediction section 203, on the basis of the supplied motion vector described above, a motion compensation circuit 230 extracts a picture in a position indicated by the motion vector in units of blocks from the picture signals (reference pictures) stored in the frame memory 220. A DCT circuit 240 performs orthogonal transform (DCT) for the extracted picture and outputs the result as a transform coefficient output BMC to the adder 193 and the selector 300.

[0139] Meanwhile, the enhancement layer bit stream 22 is supplied to the enhancement layer. This bit stream 22 is stored in the enhancement layer input buffer 162 and supplied to the demultiplexer 152.

[0140] The demultiplexer 152 demultiplexes the bit stream 22. That is, the bit stream 22 is formed by multiplexing signals of the side information such as the quantized value of a transform coefficient, the motion vector, and the quantization scale Q_scale. Upon receiving the bit stream 22, therefore, the demultiplexer 152 demultiplexes the bit stream into the original codes such as the quantized value of the transform coefficient, the motion vector, and the quantization scale Q_scale.

[0141] The codes demultiplexed by the demultiplexer 152 are supplied to the variable-length decoder 142 and decoded into signals of the quantized value of the transform coefficient, the motion vector, and the like. Of the decoded signals, the motion vector is supplied to the motion compensation prediction section 202, and the quantized value of the transform coefficient and the quantization scale Q_scale are supplied to the dequantizer 172. The dequantizer 172 dequantizes the quantized value of the transform coefficient in correspondence with the quantization scale Q_scale and supplies the dequantized transform coefficient to the adder 181. The dequantized value is added to a dequantized value 31 of the base layer supplied from the dequantizer 173, aid the sum is supplied to the adder 192.

[0142] The adder 193 adds the output from the adder 181 and a signal EP supplied from the selector 300 to thereby calculate the reconstructed value in the transform coefficient domain. This reconstructed value is supplied to the motion compensation prediction section 202. The configuration of the motion compensation prediction section 202 is as shown in FIG. 3B. That is, the reconstructed value supplied from the adder 193 is inversely orthogonally transformed by an IDCT circuit 210 in the motion compensation prediction section 202 and output as a reconstructed picture signal 40. The signal is also stored in a frame memory 220 in the motion compensation prediction section 202.

[0143] In the motion compensation prediction section 202, on the basis of the supplied motion vector described above a motion compensation circuit 230 extracts a picture in a position indicated by the motion vector in units of blocks from the picture signals (reference pictures) stored in the frame memory 220. A DCT circuit 240 performs orthogonal transform (DCT) for the extracted picture and outputs the result as a transform coefficient output BMC to the adder 193 and the selector 300.

[0144] The selector 300 receives the decision result from the binarizing circuit 310 and selects one of BMC and EMC. That is, the binarizing circuit 310 receives an output BQ from the variable-length decoder 143 and decides whether the value is “0”. This decision result is supplied to the selector 300.

[0145] If the value of the output BQ from the variable-length decoder 143 is “0”, the selector selects the transform coefficient output EMC from the motion compensation prediction section 202. If the value is “1”, the selector 300 selects the transform coefficient output BMC from the motion compensation prediction section 203.

[0146] That is, the binarizing circuit 310 outputs “0” when the value of the output BQ from the variable-length decoder 143 in the base layer is “0” and outputs “1” when the value is not “0”. Therefore, the selector 300 is made to select EMC when the output from the binarizing circuit 310 is “0” and BMC when the output is “1”. Consequently, the transform coefficient output EMC from the motion compensation prediction section 202 in the enhancement layer is applied to a transform coefficient in a position where the output BQ from the variable-length decoder 143 is “0”, and the transform coefficient output BMC from the motion compensation prediction section 203 in the base layer is applied to a transform coefficient in a position where the output BQ from the variable-length decoder 143 is not “0”.

[0147] The output from the variable-length decoder 143 in the base layer contains the motion compensation prediction error signal and the motion vector obtained on the encoding side. When the motion compensation prediction error signal and the motion vector are supplied to the motion compensation prediction section 203, the motion compensation prediction section 203 obtains the motion compensation prediction error between the picture of the immediately previous frame and the current picture.

[0148] Meanwhile, the binarizing circuit 310 receives the decoded base layer motion compensation prediction value signal from the variable-length decoder 143. If the signal value is “0”, the binarizing circuit 310 outputs “0” to the selector 300. If the signal value is not “0”, the binarizing circuit 310 outputs “1” to the selector 300.

[0149] If the output from the binarizing circuit 310 is “0”, the selector 300 selects the output EMC with a smaller encoding deviation from the enhancement layer motion compensation prediction section 203. If the output from the binarizing circuit 310 is “1”, the selector 300 selects the transform coefficient output BMC with a larger encoding deviation from the base layer motion compensation prediction section 202.

[0150] Eventually, if the DCT coefficient error obtained by the base layer motion compensation prediction is “0”, the output from the motion compensation prediction section 202 which is the reconstructed value of the transform coefficient output EMC from the enhancement layer motion compensation prediction section 200 is selected. If the error is “1”, the output from the motion compensation prediction section 203 which is the reconstructed value of the transform coefficient output BMC from the base layer motion compensation prediction section 201 is selected.

[0151] This processing is analogous to the processing in the encoding apparatus. Accordingly, as the transform coefficient output of motion compensation prediction in the enhancement layer, as in the selection done on the encoding side, an output for the base layer is used in a portion where motion compensation prediction is incorrect, and an output for the enhancement layer with a smaller encoding deviation is used in a portion where the prediction is correct. Consequently, following this switching the encoding apparatus can smoothly reconstruct pictures.

[0152] In the first embodiment described above, each frame of a video picture is divided into matrix blocks each having a predetermined number (N×N) of pixels and orthogonally transformed to obtain transform coefficients of individual spacial frequency bands. For each of the N×N transform coefficients thus obtained, motion compensation is performed in the domain of the transform coefficient in upper and lower layers. When motion compensation is to be performed in this video encoding, whether motion compensation prediction is correct is checked on the basis of an already decoded and quantized value in the lower layer (base layer). If the motion compensation prediction is correct, the upper layer (enhancement layer) is encoded by using a motion compensation prediction value with a smaller encoding deviation obtained for the upper layer. If the motion compensation prediction is incorrect, the upper layer is encoded by using a motion compensation prediction value obtained for the lower layer (base layer) and having a larger encoding deviation than that for the enhancement layer. This improves the coding efficiency of a coefficient the motion compensation prediction for which is incorrect and thereby realizes an encoding system capable of encoding with little decrease in the coding efficiency.

[0153] The foregoing is an embodiment in which a whole video picture is efficiently encoded in the scalable encoding method. An embodiment in which the present invention is applied to arbitrary-shape picture encoding by which a background and an object in a video picture are separately encoded will be described below. This second embodiment of the present invention will be described with reference to FIGS. 5, 6A, 6B, and 7. In this embodiment, the technique of the first embodiment is applied to pictures having arbitrary shapes represented by alpha-map signals.

[0154]FIG. 5 shows an encoding apparatus of the present invention as the second embodiment. The basic configuration of this encoding apparatus is the same as the encoding apparatus explained in the first embodiment. Accordingly, the same reference numerals as in the configurations shown in FIGS. 1 and 4 denote the same parts and a detailed description thereof will be omitted.

[0155] This configuration differs from FIG. 1 in eight points; that is, an arbitrary shape orthogonal transform circuit 101 is provided instead of the DCT circuit 100, inputs are received via a frame memory 700, an encoding controller 420 is provided instead of the encoding controller 400, an encoding controller 430 is provided instead of the encoding controller 410, a motion compensation prediction section 600 is provided instead of the motion compensation prediction section 200 for an enhancement layer, a motion compensation prediction section 601 is provided instead of the motion compensation prediction section 201, a motion vector detector 510 is provided instead of the motion vector detector 500, and a multiplexer 155 is provided instead of the multiplexer 151.

[0156] The frame memory 700 temporarily holds an input picture signal in units of frames. The arbitrary shape orthogonal transform circuit 101 extracts an object region from the pictures stored in the frame memory 700 by referring to a separately supplied alpha-map. The circuit 101 divides the rectangle region including the object region into blocks of a predetermined pixel size and performs DCT for each block.

[0157] The encoding controller 420 refers to the alpha-map and generates a quantization scale Q_scale, which gives an enhancement layer optimum quantization scale to output buffer capacity information from an output buffer 160, and side information. The encoding circuit 430 refers to the alpha-map and generates a quantization scale Q_scale, which gives a base layer optimum quantization scale and side information to output buffer capacity information from an output buffer 161, and side information.

[0158] The motion compensation prediction section 600 refers to the alpha-map and performs motion compensation prediction for a picture in the interest region part on the basis of a reconstructed value in a transform coefficient domain supplied from an adder 190 and a reconstructed value in an immediately previous frame. The motion compensation prediction section 601 refers to the alpha-map and performs motion compensation prediction for the picture in the interest region part on the basis of a reconstructed value in the transform coefficient domain supplied from an adder 191 and the reconstructed value in the immediately previous frame.

[0159] The motion vector detector 510 refers to the alpha-map and detects a motion vector in the picture in the interest region part from the pictures stored in the frame memory 700.

[0160] The multiplexer 155 is provided for the base layer. The multiplexer 155 multiplexes a variable-length code of a prediction error signal from a variable-length encoder 141, a variable-length code of side information such as mode information containing quantization scale information, a variable-length code of a motion vector, and a code (alpha-code) of a separately supplied alpha-map, and supplies the multiplexed signal to the output buffer 161.

[0161] In this apparatus with the above configuration, an input picture signal 10 is temporarily stored in the frame memory 700 and read out to the arbitrary shape orthogonal transform circuit 101 and the motion vector detector 510. In addition to the picture signal 10, an alpha-map signal 50 which is a map information signal for distinguishing a background portion from an object portion in a picture is input to the arbitrary shape orthogonal transform circuit 101.

[0162] This alpha-map signal can be acquired by applying, e.g., a chromakey technique. For example, in the case of an alpha-map for distinguishing a person (object) from a background, the image of the person is taken by the chromakey technique and binarized to obtain a bitmap picture in which the person image region is “1” and the background region is “0”. This picture can be used as an alpha-map.

[0163] The arbitrary-shape orthogonal transform circuit 101 refers to this alpha-map signal, checks where the object region of the picture is, divides the rectangle region including the object region into square blocks each consisting of N×N pixels, and orthogonally transforms each block to obtain N×N transform coefficients. As a technique to orthogonally transform an arbitrary-shape region of a picture by using an alpha-map, it is only necessary to use a technique established by the present inventors and disclosed in above-mentioned Japanese Patent Application No. 7-97073 which is already filed.

[0164] Although the explanation of the operation of the encoding apparatus according to the second embodiment has not finished, processing of decreasing a step will be described below as a modification.

[0165] In the method of the second embodiment described above, the average value of the object is arranged in the background. In addition to this processing, if pixel values of the object are compressed around the average value by a predetermined scaling coefficient, the step of a pixel value in the boundary between the object and the background can be decreased. Details of this processing will be described below.

[0166] To decrease the step of a pixel value in the boundary between the object and the background, pixel values of the object are compressed around the average value by a predetermined scaling coefficient. Examples of the method are illustrated in FIGS. 16 and 17. Although actual pictures are two-dimensional signals, one-dimensional signals are shown for simplicity. In these drawings, a pixel value is plotted on the ordinate, and a pixel row is plotted on the abscissa. The left-hand side of the position of a pixel row e is an object region, and the right-hand side is a background region. FIG. 16 shows a state in which a pixel value average value a of the object is arranged in the background portion.

[0167]FIG. 17 shows the result of compression around the pixel value average value a. Assuming the luminance before the compression is x and the luminance after the compression is y, the luminance y after the compression can be represented by where c is a constant between “0” and “1”.

y=c×(x−a)+a

[0168] Compression can be performed for all pixels x1 to x23 in an object shown in FIG. 18. However, the step can also be decreased by compressing only the pixels x1 to x8 in the object close to the boundary to the background portion. Although an additional arithmetic operation is necessary to check whether a pixel is close to the boundary, the method has the advantage that the pixels x9 to x23 in the object not in contact with the boundary to the background are kept unchanged.

[0169] In this modification, it is decided that, of pixels in the object, those in contact with the background in any of the upper, lower, left, and right portions are pixels close to the boundary.

[0170] The foregoing is the modification by which pixel values in the object are compressed around the average value by a predetermined scaling coefficient in order to decrease the step of a pixel value in the boundary between the object and the background. However, the step of a pixel value in the boundary between the object and the background can also be decreased by processing the background portion. This modification will be described below.

[0171]FIG. 19 shows the modification of processing the background portion. In this modification, of pixels in the background, the values of pixels close to the object region are so altered as to decrease the step. A practical example is shown in FIG. 20. Referring to FIG. 20, xn (n=1 to 23) indicates a pixel value in the object and an (n=1 to 41) indicates a pixel value in the background. Before the processing, all pixel values an in the background are equal to a pixel average value a.

[0172] First, the values of background pixels a1 to a9 in contact with pixels in the object region in any of the upper, lower, left, and right portions are replaced with average values of the values of the contacting object pixels xn and their own pixel values. For example, the background pixel a1 is replaced with “(a1+x1)/2”, and the background pixel a3 is replaced with “(a3+x2+x3)/3”.

[0173] Subsequently, the background pixels a10 to a17 in contact with the background pixels a1 to a9 are similarly replaced. As an example, a10 is replaced with “(a10+a1)/2”. As the background pixel a1, the previously replaced value is used.

[0174] Likewise, the background pixels a18 to a24 are sequentially replaced. As a consequence, the steps of pixel values in the boundary between the object and the background are decreased.

[0175] When pixel values are altered as described above, the average value of the block changes. Therefore, pixel values in the background portion can also be corrected so that the original block average value remains unchanged. This correction is to add or subtract a predetermined value to or from all pixels in the background or to alter pixel values in the background far from the boundary in a direction opposite to the luminance direction in which pixel values close to the boundary are altered.

[0176] When pixel values in the object are altered, a picture close to an input picture can be obtained by restoring the portion before the alteration after the picture is decoded. For example, in the above method in which compression is performed around the average value, alteration is done as follows assuming that a decoded value of a pixel compressed in encoding is yd and a pixel value after the alteration is xd: where ad is the average value of the object or the background of the decoded picture or the average value of the whole block. Although yd often takes a value somewhat different from y due to an encoding/decoding distortion, xd close to x can be obtained by this alteration.

[0177] According to the encoding apparatus of the above modifications, as shown in FIG. 21, a picture signal is input to the input terminal of a switch 2003 one output terminal of which is connected to a switch 2009, a compressor 2010 and an average circuit 2011. The output terminal of the compressor 2010 is connected to the other input terminal of the switch 2009. The output terminal of the switch 2005 is connected to the switch 2005. The output terminal of the average circuit 2011 is connected to the compressor 2010 and the switch 2005.

[0178] A decision circuit 2004 receives an alpha-map signal and the output terminal of the decision circuit 2004 is connected to the control terminal of the switch 2009. An encoder 2006 receives the alpha-map signal and a DCT circuit 2017 receives a signal selected by the switch 2005.

[0179] In the encoding apparatus constructed as described above, the encoder 2006 encodes an externally input alpha-map signal 2001. The switch 2003 receives the alpha-map signal 2001 and a picture signal 2002. On the basis of the alpha-map signal 2001, the switch 2003 divides the picture signal 2002 into an object picture 2007 and a background picture 2008 and discards the background picture 2038. “Discarding” does not necessarily mean “sending the picture to some other place” but simply means that the picture is left unused after that.

[0180] The decision circuit 2004 decides on the basis of the alpha-map signal 2001 whether an interest pixel which is a pixel currently being processed in the object picture 2007 supplied via the switch 2003 is in contact with the background. The decision circuit 2004 supplies a decision result 2013 to the switch 2009.

[0181] The average circuit 2011 calculates an average value 2012 of the object picture 2007 supplied via the switch 2003 and outputs the average value 2012 to the compressor 2010 and the switch 2005. The compressor 2010 compresses the amplitude of the object picture 2007 around the average value 2012 to obtain a compressed picture 2014 and outputs the compressed picture 2014 to the switch 2009.

[0182] The switch 2009 receives the compressed picture 2014 and the object picture 2007 from the switch 2003 and refers to the decision result 2013 from the decision circuit 2004. If the interest pixel is a pixel in a portion in contact with the background, the switch 2009 selectively outputs the compressed picture 2014 as an encoded picture 2015 of the object. If the interest pixel is not in contact with the background, the switch 2009 selectively outputs the object picture 2007 as the encoded picture 2015 of the object.

[0183] The switch 2005 receives the alpha-map signal 2001, the encoded picture 2015 of the object supplied from the switch 2009, and the average value 2012 calculated by the average circuit 2011. On the basis of the input alpha-map signal 2001, if the interest pixel which is a pixel currently being processed is the object, the switch 2005 selectively outputs the encoded picture 2015 of the object as an encoded picture 2016. If the interest pixel is the background, the switch 2005 selectively outputs the average value 2012 as the encoded picture 2016.

[0184] The DCT circuit 2017 performs DCT for the output encoded picture 2016 from the switch 2005 and outputs a transform coefficient 2018.

[0185] In the encoding apparatus with the above configuration, the alpha-map signal 2001 and the picture signal 2002 are externally input. The alpha-map signal 2011 is supplied to the switch 2003, the decision circuit 2004, the switch 2005, and the encoder 2006. The picture signal 2002 is supplied to the switch 2003.

[0186] On the basis of the input alpha-map signal 2001, the switch 2003 divides the picture signal 2002 into the object picture 2007 and the background picture 2008 and discards the background picture 2008. As described previously, “discarding” does not necessarily mean “sending the picture to some other place” but simply means that the picture is left unused after that.

[0187] The object picture 2007 separated by the switch 2003 is supplied to the switch 2009, the compressor 2010, and the average circuit 2011. The average circuit 2011 calculates the average value 2012 of the object picture and supplies the average value 2012 to the compressor 2010 and the switch 2005. The compressor 2010 compresses the amplitude of the object picture 2007 around the average value 2012 and supplies the compressed picture 2014 obtained by this compression to the switch 2009.

[0188] The decision circuit 2004 which has received the alpha-map signal 2001 decides whether an interest pixel which is a pixel currently being processed is in contact with the background, and supplies the decision result 2013 to the switch 2009. If the decision result 2013 from the decision circuit 2004 indicates that the interest pixel is in contact with the background, the switch 2009 selectively outputs the compressed picture 2014 as the encoded picture 2015 of the object. If the interest pixel is not in contact with the background, the switch 2009 selectively outputs the object picture 2007 as the encoded picture 2015 of the object.

[0189] The output encoded picture 2015 of the object from the switch 2009 is supplied to the switch 2005. The switch 2005 refers to the alpha-map signal 2001 and, if the interest pixel is the object, selectively outputs the encoded picture 2015 of the object as the encoded picture 2016. If the interest pixel is the background, the switch 2009 selectively outputs the average value 2012 as the encoded picture 2016.

[0190] The encoded picture 2016 output from the switch 2005 is supplied to the DCT circuit 2017. The DCT circuit 2017 performs DCT for the encoded picture 2016 to obtain the transform coefficient 2018 and outputs the transform coefficient 2018 to the outside. The alpha-map signal 2001 is encoded by the encoder 2006 and output to the outside as an alpha-code 2019.

[0191] Note that there is another method in which an alpha-map is encoded before a picture is encoded and the decoded signal is input to the switches 2003 and 2005 and the decision circuit 2004 If a distortion occurs in encoding and decoding of an alpha-map, the alpha-map signals on the encoding and decoding sides can be made equal by this method.

[0192]FIG. 22 shows a decoding apparatus as a counterpart of the encoding apparatus in FIG. 21. According to this decoding apparatus, a decoder 2020 receives an encoded alpha-map signal. The output terminal of the decoder 2020 is connected to control terminals of switches 2023 and 2025 and a decision circuit 2024. An inverse DCT circuit 2021 receives transform efficient 2018 of the encoded picture. The output terminal of the inverse DCT circuit 2021 is connected to a decompressor 2030 and an average circuit 2031. The output terminal of the decompressor 2030 is connected to a switch 2029 together with the output terminal of the switch 2023. The switch 2029 is connected to a switch 2036.

[0193] In the decoding apparatus as described above, the decoder 2020 receives the externally input alpha-code 2019, decodes the alpha-code 2019, and supplies a decoded alpha-map signal 2022 to the switch 2023, the decision circuit 2024, and the switch 2025. The inverse DCT circuit 2021 performs inverse DCT for the externally input transform coefficient 2018 to decode a picture and supplies the picture obtained by the decoding, i.e., a decoded picture 2026, to the switch 2023.

[0194] The decision circuit 2024 decides on the basis of the alpha-map signal 2022 decoded by the decoder 2020 whether an interest pixel in an object picture 2027 is in contact with the background. The decision circuit 2024 outputs a decision result 2034 to the switch 2029.

[0195] On the basis of the alpha-map signal 2022 decoded by the decoder 2020, the switch 2023 divides the decoded picture 2026 supplied from the inverse DCT circuit 2021 into the object picture 2027 and a background picture 2028. The switch 2023 outputs the object picture 2027 to the switch 2029, the decompressor 2030, and the average circuit 2031 and discards the background picture 2028.

[0196] The average circuit 2031 calculates an average value 2032 of the object picture 2027 supplied from tile switch 2023 and outputs the average value 2032 to the decompressor 2030. The decompressor 2030 expands the amplitude of the object picture 2027 around the average value 2032 to obtain an expanded picture 2033 and outputs the expanded picture 2033 to the switch 2029.

[0197] Of the object picture 2027 and the expanded picture 2033 thus input, the expanded picture 2033 is selectively output as a decoded picture 2035 of the object from the switch 2029 to the switch 2025, if the output decision result 2034 from the decision circuit 2033 indicates that the interest pixel is in contact with the background. If the interest pixel is not in contact with the background, the switch 2029 selectively outputs the object picture 2027 as the decoded picture 2035 of the object to the switch 2025.

[0198] The switch 2025 receives the decoded picture 2035 of the object and a signal 2037 which is separately input as the background, and refers to the alpha-map signal 2022. If the interest pixel is the object, the switch 2025 selectively outputs the decoded picture 2035 of the object as a reconstructed picture 2036 to the outside. If the interest pixel is the background, the switch 2025 selectively outputs the signal 2037 as the reconstructed picture 2036 to the outside.

[0199] In the decoding apparatus with the above configuration, the alpha-code 2019 and the transform coefficient 2018 are externally input. The alpha-code 2019 is supplied to the decoder 2020, and the transform coefficient 2018 is supplied to the inverse DCT circuit 2021.

[0200] The decoder 2020 decodes the alpha-map signal 2022 and outputs the decoded signal to the switch 2023, the decision circuit 2024, and the switch 2025. The inverse DCT circuit 2021 decodes the picture and supplies the decoded picture 2026 to the switch 2023.

[0201] On the basis of the alpha-map signal 2022 decoded by the decoder 2020, the switch 2023 divides the decoded picture 2026 into the object picture 2027 and the background picture 2028 and discards the background picture 2028. The object picture 2027 separated by the switch 2023 is supplied to the switch 2029, the expander 2030, and the average circuit 2031.

[0202] The average circuit 2031 calculates the average value 2032 of the object picture 2027 and supplies the average value 2032 to the expander 2030.

[0203] The expander 2030 expands the amplitude of the object picture 2027 around the average value 2032 and supplies the expanded picture 2033 thus obtained to the switch 2029.

[0204] The decision circuit 2024 decides whether an interest pixel in the object picture 2027 is in contact with the background and supplies the decision result 2034 to the switch 2029. If the decision result 2034 indicates that the interest pixel is in contact with the background, the switch 2029 selectively outputs the expanded picture 2033 as the decoded picture 2035 of the object. If the interest pixel is not in contact with the background, the switch 2029 selectively outputs the object picture 2027 as the decoded picture 2035 of the object.

[0205] The output decoded picture 2035 of the object from the switch 2029 is supplied to the switch 2025. The switch 2025 refers to the alpha-map signal 2022 and, if the interest pixel which is a pixel currently being processed is the object, outputs the decoded picture 2035 of the object as the reconstructed picture 2036 to the outside. If the interest pixel is the background, the switch 2029 selectively outputs the signal 2037, which is separately input as the background, as the reconstructed picture 2036. Note that a reconstructed signal of a background picture which is separately encoded or a predetermined pattern is used as the background signal 2037.

[0206] The foregoing are examples of the processing of decreasing the step.

[0207] The examples of the processing of decreasing the step have been described above, and a description will return to the subject of the second embodiment.

[0208] As already described above, the arbitrary shape orthogonal transform circuit 101 refers to the alpha-map signal, checks the interest region of the picture, divides the interest region of the picture into square blocks each consisting of N×N pixels, and orthogonally transforms each block to obtain N×N transform coefficients.

[0209] For a block containing the boundary between the object and the background, a transform coefficient for the object and a transform coefficient for the background are calculated. These transform coefficients are supplied to adders 110 and 111 for the enhancement layer and the base layer, respectively.

[0210] Upon receiving the transform coefficient, the adder 111 of the base layer calculates a prediction error signal between this transform coefficient and a motion compensation prediction value (BMC) which is converted into an orthogonal transform coefficient and supplied from the motion compensation prediction section 601. The adder 111 supplies the result to a quantizer 131. The quantizer 131 quantizes the prediction error signal in accordance with the quantization scale Q_scale supplied from the encoding controller 430 and supplies the quantized signal to the variable-length encoder 141 and a dequantizer 171.

[0211] The variable-length encoder 141 performs variable-length encoding for the quantized prediction error signal The variable-length encoder 141 also performs variable-length encoding for the side information such as the mode information containing the quantization scale information supplied from the encoding controller 430 and the motion vector supplied from the motion vector detector 510.

[0212] These variable-length codes obtained by the variable-length encoder 141 are supplied to the multiplexer 155. The multiplexer 155 multiplexes these variable-length codes together with an alpha-code 55 which is encoded and supplied to the multiplexer 155. The multiplexer 155 outputs the multiplexed signal to the output buffer 161.

[0213] The output buffer 161 outputs the multiplexed signal as an encoded bit stream 21 to a transmission line or a storage medium and also feeds the capacity of the buffer back to the encoding controller 430. In accordance with this buffer capacity, the encoding controller 430 generates the optimum quantization scale Q_scale.

[0214] The quantized value of the prediction error signal supplied to the dequantizer 171 is dequantized by the dequantizer 171. The adder 191 adds the dequantized value to the motion compensation prediction value (BMC), thereby calculating a reconstructed value in the transform coefficient domain. The reconstructed value is supplied to the motion compensation prediction section 601.

[0215] In the enhancement layer, a selector 300 performs selection on the basis of the value of an output (BQ) from the quantizer 131 in the base layer. That is, the selector 300 adaptively switches the output (EMC) from the motion compensation prediction section 600 in the enhancement layer and the output (BMC) from the motion compensation prediction section 601 in the base layer for each transform coefficient by using a method to be described later and outputs the selected input as EP.

[0216] More specifically, the output (BQ) from the quantizer 131 in the base layer is supplied to a binarizing circuit 310. If the value of BQ is “0”, the binarizing circuit 310 outputs “0” to the selector 300.

[0217] If the value is not “0”, the binarizing circuit 310 outputs “1” to the selector 300.

[0218] If the output from the binarizing circuit 310 is “0”, the selector selectively outputs EMC as EP. If the output is BMC, the selector 300 selectively outputs BMC as EP. Consequently, the transform coefficient output EMC from the motion compensation prediction section 600 in the enhancement layer is applied to a transform coefficient in a position where the output BQ from the quantizer 131 is “0”, and the transform coefficient output BMC from the motion compensation prediction section 601 in the base layer is applied to a transform coefficient in a position where the output BQ from the quantizer 131 is not “0”.

[0219] The quantizer 131 in the base layer receives and quantizes the output from the adder 111. The adder 111 receives the output from the arbitrary-shape orthogonal transform circuit 101 and the motion compensation prediction value obtained from a picture in an immediately previous frame by the motion compensation prediction section 601 and calculates the difference between them. Therefore, if the motion compensation prediction value is correct, the difference between the two values output from the adder 111 is “0”.

[0220] Accordingly, of the quantized values as the output BQ from the quantizer 131 in the base layer, coefficients whose values are not “0” are coefficients representing that the motion compensation prediction is incorrect.

[0221] If the motion compensation prediction section 600 performs motion compensation prediction by using the same motion vector as in the base layer supplied from the motion vector detector 510, it is estimated that motion compensation prediction for coefficients in the enhancement layer in the same positions as in the base layer is incorrect.

[0222] For these coefficients, therefore, the selector 300 selects BMC as the output from the motion compensation prediction section 601 for the base layer.

[0223] On the other hand, since it is estimated that motion compensation for other coefficients is correct, the selector 300 selects the prediction value in the enhancement layer with a smaller encoding distortion. Consequently, the signal EC encoded in the enhancement layer is the quantized error signal of the base layer if motion compensation prediction is incorrect, and is the motion compensation prediction error signal of the enhancement layer if motion compensation prediction is correct. This improves the efficiency of encoding for coefficients the motion compensation prediction for which is incorrect.

[0224] The adder 110 in the enhancement layer calculates a prediction error signal between the transform coefficient of the input picture supplied from the arbitrary-shape orthogonal transform circuit 101 and the output (EP) from the selector 300 and supplies the result to an adder 121.

[0225] The adder 121 receives a dequantized value 30 of BQ supplied from the dequantizer 171. Accordingly, the adder 121 calculates the difference EC between the value 30 and the output from the adder 110 and supplies the difference EC as a prediction error signal to a quantizer 130.

[0226] The quantizer 130 quantizes the signal EC by using the quantization scale Q_scale supplied from the encoding controller 420 in accordance with the buffer capacity. The quantizer 130 supplies the quantized output to a variable-length encoder 140 and a dequantizer 170. The variable-length encoder 140 separately performs variable-length encoding for the quantized prediction error signal and the side information such as the mode information supplied from the encoding controller 420 and supplies the variable-length codes to a multiplexer 150.

[0227] The multiplexer 150 multiplexes these variable-length codes and supplies the multiplexed signal to the output buffer 160. The output buffer 160 temporarily holds the signal and outputs the signal as an encoded bit stream 20 to a transmission line or a storage medium. Also, the output buffer 160 feeds the capacity of the buffer to the encoding controller 420. Upon receiving the buffer capacity, the encoding controller 420 generates the optimum quantization scale Q_scale corresponding to the capacity and supplies the quantization scale Q scale to the quantizer 130 and the variable-length encoder 140.

[0228] The quantized value supplied from the quantizer 130 to the dequantizer 170 is dequantized. An adder 180 adds the dequantized value to the output 30 supplied from the dequantizer 171 in the base layer, thereby reconstructing the prediction error signal.

[0229] The adder 190 adds the prediction error signal reconstructed by the adder 180 to the motion compensation prediction value (EP) supplied from the selector 300, calculating a reconstructed value in the transform coefficient domain. The reconstructed value is supplied to the motion compensation prediction section 600.

[0230]FIG. 6A is a block diagram of the motion compensation prediction sections 600 and 601. Each of the motion compensation prediction sections 600 and 601 comprises an arbitrary-shape inverse orthogonal transform circuit 610, a frame memory 620, a motion compensation circuit 630, and an arbitrary shape orthogonal transform circuit 640. The arbitrary shape inverse orthogonal transform circuit 610 inversely orthogonally transforms a reconstructed picture signal as an input signal in accordance with an alpha-map signal. The frame memory 620 temporarily holds the inversely orthogonally transformed signal in units of frames. The motion compensation circuit 630 receives the information of a motion vector, extracts a picture in a position indicated by the motion vector in units of frames, and supplies the extracted picture to the arbitrary-shape orthogonal transform circuit 640. The arbitrary-shape orthogonal transform circuit 640 orthogonally transforms the supplied picture in accordance with the alpha-map signal. In other words, the arbitrary-shape orthogonal transform circuit 640 orthogonally transforms the motion compensation prediction value of an arbitrary shape, thereby obtaining a motion compensation prediction value in a transform coefficient domain.

[0231] In this configuration, a reconstructed value in a transform coefficient domain is supplied to the motion compensation prediction sections 600 and 601. The arbitrary-shape inverse orthogonal transform circuit 610 in this motion compensation prediction section inversely transforms the reconstructed value into a reconstructed picture signal in accordance with the alpha-map signal 50 which is separately supplied. The reconstructed picture signal is stored in the frame memory 620.

[0232] Of the reference pictures stored in the frame memory 620, a picture in a position indicated by the motion vector is extracted by the motion compensation circuit 630 in the motion compensation prediction section in units of blocks, and the extracted picture is supplied to the arbitrary shape orthogonal transform circuit 640 in the motion compensation prediction section. Upon receiving the blocks of the picture, the arbitrary shape orthogonal transform circuit 640 orthogonally transforms the picture blocks in accordance with the externally supplied alpha-map signal 50, thereby orthogonally transforming the motion compensation prediction value of an arbitrary shape. Consequently, the arbitrary shape orthogonal transform circuit 640 can calculate and output the motion compensation prediction value in the transform coefficient domain. In a block containing the boundary between the object and the background, transform coefficients of both the object and the background are calculated.

[0233] From the reconstructed value in the transform coefficient domain, the motion compensation prediction sections 600 and 601 calculate the motion compensation prediction values EMC and BMC in the transform coefficient domain and supplies the values to the selector 300.

[0234] The foregoing is the explanation of the encoding apparatus of the second embodiment. The decoding apparatus of the second embodiment will be described below.

[0235]FIG. 7 is a block diagram of the decoding apparatus of the present invention.

[0236] This configuration differs from FIG. 4 in three points; that is, a motion compensation prediction section 602 is provided instead of the motion compensation prediction section 201, a motion compensation prediction section 603 is provided instead of the motion compensation prediction section 203, and a demultiplexer 157 is provided instead of the demultiplexer 153.

[0237] Each of the motion compensation prediction sections 602 and 603 performs motion compensation prediction by referring to an alpha-map signal. The demultiplexer 153 demultiplexes a quantized value of a transform coefficient, a motion vector, and side information such as a quantization scale and transfers the demultiplexed signals to the variable-length decoder 143. The demultiplexer 157 additionally has a function of demultiplexing an alpha-code and transferring the demultiplexed codes to an alpha-map decoding apparatus (not shown).

[0238] In this configuration, a base layer bit stream 23 which is formed by encoding and multiplexing a quantized value of a transform coefficient, a motion vector, side information such as a quantization scale, and an alpha-code is input to the input stage of the base layer. This bit stream 23 is stored in an input buffer 167 and supplied to the demultiplexer 157.

[0239] The demultiplexer 157 demultiplexes the bit stream into the quantized value of the transform coefficient, the motion vector, the side information, and the alpha-code. Of these demultiplexed codes, the quantized value of the transform coefficient, the motion vector, and the side information are supplied to a variable-length decoder 143 and decoded into signals of the quantized value of the transform coefficient, the motion vector, and the quantization scale. Note that a code (alpha-code) 56 of an alpha-map signal is supplied to an alpha-map decoding apparatus (not shown) where the code is converted into the alpha-map signal, and the signal is supplied to the motion compensation prediction sections 602 and 603.

[0240] Of the signals decoded by the variable-length decoder 143, the quantized value of the transform coefficient is dequantized by a dequantizer 173 and supplied to an adder 193. The adder 193 adds the dequantized transform coefficient and a motion compensation prediction value in a transform coefficient domain supplied from the motion compensation prediction section 603, thereby calculating a reconstructed value in the transform coefficient domain.

[0241] This reconstructed value is supplied to the motion compensation prediction section 603 and inversely transformed into a reconstructed picture signal by an arbitrary-shape inverse orthogonal transform circuit 610. The signal is output as an output reconstructed picture signal 41 and stored in a frame memory 620 (FIG. 6B).

[0242] An enhancement layer bit stream 22 formed by encoding and multiplexing signals of a quantized value of a transform coefficient and side information such as a quantization scale is input to the input stage of the enhancement layer. The bit stream 22 is stored in an input buffer 162 and supplied to a demultiplexer 152. The demultiplexer 152 demultiplexes the bit stream into a code of the quantized value of the transform coefficient and a code of the side information.

[0243] The codes demultiplexed by the demultiplexer 152 are supplied to a variable-length decoder 142 and decoded into signals of the quantized value of the transform coefficient and the quantization scale. The quantized value of the transform coefficient is dequantized by a dequantizer 172 and supplied to an adder 181. The adder 181 adds this dequantized value to a dequantized value 31 supplied from the dequantizer 173 of the base layer and supplies the sum to an adder 192.

[0244] The adder 192 adds the output from the adder 181 and the signal EP supplied from the selector 300 and thereby calculates a reconstructed value in a transform coefficient domain. This reconstructed value is supplied to the motion compensation prediction section 602 and inversely transformed into a reconstructed picture signal by an arbitrary-shape inverse orthogonal transform circuit 610 (FIG. 6B) provided in the motion compensation prediction section 602. The reconstructed picture signal is output as an output reconstructed picture signal 40 and stored in a frame memory 620 provided in the motion compensation prediction section 602.

[0245] Of the reference pictures stored in the frame memory 620, a picture in a position indicated by the motion vector is extracted by a motion compensation circuit 630 (FIG. 6B) in the notion compensation prediction section in units of blocks, and the extracted picture is supplied to an arbitrary shape orthogonal transform circuit 640 in the motion compensation prediction section. The arbitrary-shape orthogonal transform circuit 640 orthogonally transforms the motion compensation prediction value of an arbitrary shape in accordance with an externally supplied alpha-map signal 50, thereby calculating and outputting a motion compensation prediction value in a transform coefficient domain. For a block containing the boundary between the object and the background, transform coefficients for both the object and the background are calculated.

[0246] In this way, the motion compensation prediction sections 600 and 601 calculate the motion compensation prediction values EMC and BMC in the transform coefficient domain from the reconstructed value in the transform coefficient domain and supplies these values to the selector 300.

[0247] One modification of the motion compensation prediction sections 600, 601, 602, and 603 of the second embodiment will be described below with reference to FIGS. 8A and 8B. This modification is accomplished by expanding a background prediction system (e.g., Miyamoto et al.: “Adaptive Predictive Coding System Using Background Prediction”, PCSJ88,7-4, pp. 93-94, Watanabe et al.: “Adaptive Four-Difference—DCT Coding System”, PCSJ88,8-2, pp. 117-118), which is conventionally used to improve the efficiency of encoding of a background region hidden by the movement of an object, so that the system is also usable to overlapping of objects.

[0248] As shown in FIGS. 8A and 8B, the motion compensation prediction section comprises an arbitrary-shape inverse orthogonal transform circuit 610, an SW circuit 650, frame memories 621, 622, and 623, an SW circuit 651, a motion compensation circuit 630, and an arbitrary shape orthogonal transform circuit 640.

[0249] The arbitrary-shape inverse orthogonal transform circuit 610 inversely transforms a reconstructed picture signal in accordance with an alpha-map signal. When a reconstructed value in a transform coefficient domain is input to the motion compensation prediction section, this reconstructed value is supplied to the arbitrary-shape inverse orthogonal transform circuit 610 as one component of the motion compensation prediction section. The circuit 610 inversely transforms the reconstructed value into a reconstructed picture signal in accordance with an alpha-map signal. This alpha-map signal is supplied from an alpha-map decoding apparatus (not shown) provided in the decoding system.

[0250] The reconstructed picture signal inversely transformed by the arbitrary-shape inverse orthogonal transform circuit 610 is stored in one of the frame memories 621, 622, and 623. The SW circuit 650 selects one of the frame memories 621, 622, and 623 into which the signal is stored. For example, of the frame memories 621, 622, and 623, the frame memories 621 and 622 are used to store object pictures, and the frame memory 623 is used to store background pictures. The object frame memories are prepared for two frames to separately hold pictures of two different objects appearing in a frame. If three or more different objects exist, it is only necessary to prepare the number of object frame memories corresponding to the number of objects and allow the switch circuit 650 to select a corresponding frame memory.

[0251] The SW circuit 650 can store the reconstructed picture signal from the arbitrary-shape inverse orthogonal transform circuit 610 in one of the frame memories 621, 622, and 623 in accordance with an alpha-map signal by opening or closing the switch in accordance with the alpha-map signal.

[0252] The SW circuit 651 opens or closes the switch in accordance with the alpha-map signal, thereby selecting one of the frame memories 621, 622, and 623 in accordance with the alpha-map signal and reading out the reconstructed picture signal stored in that memory. Of the reconstructed picture signal (reference picture) read out from the frame memory 621, 622, or 623 via the SW circuit 651, the motion compensation circuit 630 extracts a picture in a position indicated by a motion vector in units of blocks; and supplies the extracted picture to the arbitrary-shape orthogonal transform circuit 640.

[0253] The arbitrary-shape orthogonal transform circuit 640 orthogonally transforms the reconstructed picture signal of the picture in the position indicated by the motion vector, which is read out from the frame memory 621, 622, or 623 via the SW circuit 651, on the basis of the alpha-map signal, thereby orthogonally transforming a motion compensation prediction value of a picture of an arbitrary shape indicated by the alpha-map signal. That is, the circuit 640 calculates and outputs the motion compensation prediction value in the transform coefficient domain.

[0254] In the configuration shown in FIGS. 8A and 8B, it is assumed that the alpha-map supplied to the arbitrary-shape inverse orthogonal transform circuit 610 can specify one of a plurality of objects and a background to which a pixel belongs.

[0255] In this configuration, a reconstructed value in a transform coefficient domain is supplied to the motion compensation prediction section. A portion of this reconstructed value, i.e., a picture of an arbitrary shape indicated by an alpha-map is inversely orthogonally transformed into a reconstructed picture signal by the arbitrary-shape inverse orthogonal transform circuit 610. The reconstructed picture signal is stored in one of the frame memories 621, 622, and 623 for the objects and the background by the SW circuit 650 in accordance with the alpha-map signal.

[0256] These stored signals are sequentially selected and read out by the SW circuit 651 in accordance with the alpha-map signal and supplied to the motion compensation circuit 630 where a motion compensation prediction value is calculated.

[0257] As described above, to calculate the motion compensation prediction value in the motion compensation circuit 630, the SW circuit 651 forms the motion compensation prediction value from the reference pictures stored in the frame memories. This improves the efficiency of encoding of a region which is hidden by overlapping of objects.

[0258] The motion compensation prediction value calculated by the motion compensation circuit 630 is supplied to the arbitrary-shape orthogonal transform circuit 640 and orthogonally transformed on the basis of the alpha-map signal. The result is an orthogonal transform coefficient of the motion compensation prediction value of the picture of the arbitrary shape indicated by the alpha-map signal.

[0259] In this modification as described above, to obtain the motion compensation prediction value in the motion compensation circuit 630, the motion compensation prediction value is formed for each of pictures stored in the frame memories which separately store pictures of the objects and the background in accordance with an alpha-map signal. This improves the efficiency of encoding of a region hidden by overlapping of the objects.

[0260] Other configurations of the quantizers 130 and 131 and the dequantizers 170, 171, 172, and 173 in the first and second embodiments will be described below with reference to FIGS. 2 and 9 to 11.

[0261] Quantization matrices shown in FIGS. 9 and 10 are described in TM5 as a test model of MPEG2. In each of FIGS. 9 and 10, the matrix is represented by a two-dimensional matrix in a horizontal direction (h) and a vertical direction (v) with respect to 8×8 transform coefficients.

[0262] The following equations show examples of quantization and dequantization using the quantization matrices in FIGS. 9 and 10.

[0263] Quantization:

level(v,h)=sign(coef(v,h))*|coef(v,h)|*(v,h)/(2*Q_(—) scale)  (1)

[0264] Inverse quantization:

coef′(v,h)=sing(level(v,h))(2*|level(v,h)|*(v,h)/16+1)*Q _(—) scale)  (2)

[0265] where

[0266] coef(v,h): transform coefficient

[0267] level(v,h): quantized value

[0268] coef′(v,h): transform coefficient (reconstructed value)

[0269] w(v,h): quantization matrix

[0270] Q_scale: quantization scale

[0271] The modification is related to a quantization matrix for changing the weight of a quantization step size for each transform coefficient. In the SNR scalability, quantization in the enhancement layer is performed more finely than in the base layer.

[0272] In the base layer, therefore, the quantization matrices as shown in FIGS. 9 and 10 are used to finely quantize low-frequency transform coefficients and roughly quantize high-frequency coefficients. If this is the case, the subjective evaluation often improves when encoding is performed at the same encoding rate as when encoding is performed with a fixed quantization step size. Also, the coding efficiency is increased by increasing the occurrence probability of 0 by enlarging the center dead zone in a quantizer. This improves the quality of reconstructed pictures at low rates.

[0273] In the enhancement layer, on the other hand, if high-frequency transform coefficients are roughly quantized, no fine textures are reconstructed to result in visual degradation. This also increases the influence of feedback quantization noise in high-frequency transform coefficients.

[0274] Accordingly, in the enhancement layer a quantization matrix is used only for a transform coefficient whose quantized value BQ in the base layer is not “0”. FIG. 11 shows an example of a quantization matrix obtained for the example shown in FIG. 2. When this matrix is used, the quantization error of a transform coefficient whose motion compensation prediction error is large is increased in the enhancement layer. However, a quantization error in a largely changing portion is inconspicuous due to the masking effect of visual characteristics, and the resulting visual degradation is little.

[0275] An example of transform to a one-dimensional sequence performed when a quantized transform coefficient is variable-length-encoded in the first and second embodiments will be described below with reference to FIGS. 2, 12, and 13. This transform to a one-dimensional sequence is generally done by using a transform method called zigzag scan shown in FIG. 12.

[0276]FIG. 12 shows a two-dimensional matrix divided into eight portions in each of a horizontal direction (h) and a vertical direction (v). In FIG. 12, 8×8transform coefficients are arranged in increasing order of numbers given in measures. Consequently, low-frequency transform coefficients are arranged first and high-frequency transform coefficients are arranged next. Therefore, the larger the ordinal number for a quantized value, the higher the probability of “0”, and this increases the coding efficiency when a combined event of the number of 0 runs and quantized values after the 0 runs is variable-length-encoded. This makes use of the properties that a lower-frequency coefficient has a higher electric power.

[0277] In this example, therefore, the scan order in the enhancement layer is such that transform coefficients in positions where the quantized value BQ of the base layer is not “0” are arranged before transform coefficients in positions where BQ is “0” so that the transform coefficients are arranged in increasing order of zigzag scan numbers.

[0278] That is, a transform coefficient in a position where BQ is “0” is a motion compensation prediction error signal in the enhancement layer, and a transform coefficient in a position where BQ is not “0” is a quantization error in the base layer. Accordingly, the above method is based on the assumption that the statistical properties of the two transform coefficients are different. FIG. 13 shows a scan order corresponding to the example shown in FIG. 2. In FIG. 13, the order of numbers given in measures is the scan order.

[0279] In the above example, it is assumed that transform bases do not overlap between blocks. On the other hand, reference: “Ikuzawa et al., Video Encoding Using Motion Compensation Filter Bank Structure, PCSJ92,8-5, 1992” has proposed an encoding method using a motion compensation filter bank structure in which a decrease of the coding efficiency is little even when bases overlap each other because a transformed difference arrangement is used.

[0280] The concept of the above reference is applicable to a prediction encoding apparatus (transformed difference arrangement) in an orthogonal transform coefficient domain as in the present invention. Therefore, the motion compensation filter bank structure can be applied to the above example.

[0281] In the second embodiment described above, a frame of a video picture is orthogonally transformed by dividing the frame into matrices each having a predetermined number (N×N) of pixels to obtain transform coefficients for individual bands of the spacial frequency, and motion compensation is performed in a transform coefficient domain for each of the N×N transform coefficients in each of upper and lower layers. In this video encoding, motion compensation is performed for a picture in an interest region by using alpha-map information. When this motion compensation is performed, whether motion compensation prediction is correct is checked on the basis of an already decoded and quantized value in the lower layer (base layer). If the motion compensation prediction is correct, encoding in the upper layer (enhancement layer) is performed by using a motion compensation prediction value obtained for the upper layer and having a smaller encoding distortion. If the motion compensation prediction is incorrect, encoding in the upper layer is done by using a motion compensation prediction value obtained for the lower layer (base layer) and having a larger encoding distortion than that in the enhancement layer. This improves the coding efficiency for a coefficient the motion compensation prediction for which is incorrect and realizes an encoding system capable of encoding with little decrease in the coding efficiency.

[0282] Accordingly, the resolution and the image quality can be varied in an arbitrary-shape picture encoding apparatus which separately encodes the background and the object. In addition, it is possible to provide scalable encoding and decoding apparatuses having a high coding efficiency.

[0283] The third embodiment will be described below with reference to FIG. 14.

[0284] As shown in FIG. 14, in blocks (enclosed by the solid lines) containing the boundary between the object and the background, motion vectors are separately detected for the object and the background. Since the number of pixels of either the object or the background decreases, the influence of noise increases, and this decreases the reliability of the motion vector.

[0285] In blocks in the boundary, therefore, the motion vector detection range is made narrower than that in other blocks (indicated by the broken lines).

[0286] Also, the object in a current frame has moved from the object in a reference frame. Therefore, erroneous detection of a motion vector can be reduced by limiting the motion vector search range for the object to the inside of the object in the reference frame. Limiting the search range also has an effect of decreasing the amount of motion vector search calculations. Likewise, a motion vector is calculated from a background portion in the background.

[0287] As described above, a large error can be prevented by making the motion vector detection range in blocks in the boundary narrower than in other blocks (indicated by the broken lines).

[0288] Finally, as an application of the present invention, an embodiment of a video transmission system to which the video encoding and decoding apparatuses of the present invention are applied will be described below with reference to FIGS. 15A to 15C.

[0289] In this system as shown in FIG. 15A, an input video signal from a camera 1002 of a personal computer (PC) 1001 is encoded by a video encoding apparatus incorporated into the PC 1001. The encoded data output from the video encoding apparatus is multiplexed with other data of sounds or information. The multiplexed data is transmitted by radio from a radio transceiver 1003 and received by another radio transceiver 1004.

[0290] The signal received by the radio transceiver 1004 is demultiplexed into the encoded data of the video signal and the data of sounds or information. The encoded data of the video signal is decoded by a video decoding apparatus incorporated into a workstation (EWS) 1005 and displayed on the display of the EWS 1005.

[0291] An input video signal from a camera 1006 of the EWS 1005 is encoded in the same fashion as above by using a video encoding apparatus incorporated into the EWS 1005. The encoded data of the video signal is multiplexed with other data of sounds or information. The multiplexed data is transmitted by radio from the radio transceiver 1004 and received by the radio transceiver 1003. The signal received by the radio transceiver 1003 is demultiplexed into the encoded data of the video signal and the data of sounds or information. The encoded data of the video signal is decoded by a video decoding apparatus incorporated into the PC 1001 and displayed on the display of the PC 1001.

[0292]FIG. 15B is a block diagram schematically showing the video encoding apparatus incorporated into the PC 1001 and the EWS 1005 in FIG. 15A. FIG. 15C is a block diagram schematically showing the video decoding apparatus incorporated into the PC 1001 and the EWS 1005 in FIG. 15A.

[0293] The video encoding apparatus in FIG. 15B comprises an information source encoding section 1102 which receives a picture signal from a video input section 1101 such as a camera and has an error resilience processor 1103, and a transmission line encoding section 1104. The information source encoding section 1101 performs discrete cosine transform (DCT) for a prediction error signal and quantizes the formed DCT coefficient. The transmission line encoding section 1104 performs variable-length encoding, error detection for encoded data, and error correcting coding. The encoded data output from the transmission line encoding section 1104 is supplied to a radio transceiver 1105 and transmitted. The processing in the data source encoding section 1101 and the variable-length encoding in the transmission line encoding section 1104 is done by applying processing methods such as explained in the embodiments of the present invention.

[0294] The video decoding apparatus shown in FIG. 15C comprises a transmission line decoding section 1202 and a data source decoding section 1203 having an error resilience processor 1204. The transmission line decoding section 1202 receives encoded data received by a radio transceiver 1201 and performs processing which is the reverse of the processing done by the transmission line encoding section 1104 for the input encoded data. The data source decoding section 1203 receives the output signal from the transmission line decoding section 1202 and performs processing which is the reverse of the processing done by the data source encoding section 1102 for the input signal. The picture decoded by the data source decoding section 1203 is output by a video output section 1025 such as a display.

[0295] The decoding processing in these sections is performed by applying processing methods such as explained in the embodiments of the present invention. As has been described above, the present invention accomplishes scalable encoding in which the quality of an arbitrary-shape picture can be varied step by step without largely decreasing the coding efficiency. Also, in the present invention, it is possible to decrease the amount of generated codes when DCT is performed for a picture of an arbitrary shape.

[0296] Additional advantages and modifications will readily occur to those skilled in the art. Therefore, the invention in its broader aspects is not limited to the specific details, representative devices, and illustrated examples shown and described herein. Accordingly, various modifications may be made without departing from the spirit or scope of the general inventive concept as defined by the appended claims and their equivalents. 

What is claimed is:
 1. A video encoding apparatus comprising: an orthogonal transform circuit for orthogonally transforming an input picture signal to obtain a plurality of transform coefficients; a first local decoder for outputting first transform coefficients for a fine motion compensation prediction picture on the basis of a previous picture; a second local decoder for outputting second transform coefficients for a coarse motion compensation prediction picture on the basis of a current picture corresponding to the input picture signal; means for detecting a degree of motion compensation prediction in said second local decoder; a selector for selectively outputting the first and second transform coefficients in accordance with the degree of motion compensation prediction; a first calculator for calculating a difference between the transform coefficients of said orthogonal transform circuit and ones of the first and second transform coefficients which are selected by said selector, and outputting a motion compensation prediction error signal; a first quantizer for quantizing the motion compensation prediction error signal from said first adder and outputting a first quantized motion compensation prediction error signal; a second calculator for calculating a difference between the second transform coefficients from said second local decoder and the transform coefficients from the orthogonal transform circuit, and outputting a second motion compensation prediction error signal; a second quantizer for quantizing the motion compensation prediction error signal from said second calculator, and outputting a second quantized motion compensation prediction error signal; and an encoder for encoding the first and second quantized motion compensation prediction error signals and outputting encoded signals.
 2. An apparatus according to claim 1, wherein said orthogonal transform circuit divides the input picture signal into a plurality of blocks each having a size of N×N pixels, orthogonally transforms the picture signal in units of blocks each having the size of N×N pixels, and outputs N×N transform coefficients to said first and second adders in units of blocks.
 3. An apparatus according to claim 1, wherein said means for detecting degree of motion compensation prediction compares the second transform coefficient from said second local decoder with the transform coefficient from said orthogonal transform circuit and outputs a detection signal corresponding to the degree of motion compensation prediction, and said selector selects the first transform coefficient from said first local decoder in response to a detection signal representing that motion compensation prediction is correct, and selects the second transform coefficient from said second local decoder in response to a detection signal representing that motion compensation prediction is incorrect.
 4. An apparatus according to claim 1, which comprises a motion vector detector for detecting a motion vector from the input picture signal, said first local decoder comprises a first dequantizer for dequantizing the first quantized motion compensation prediction error signal from said first quantizer and outputting a first output signal, a first alder for adding the first output signal from the first dequantizer and the transform coefficient selected by said selector and outputting a first local decoded signal, and a first motion compensation prediction circuit for obtaining the first transform coefficient on the basis of the first local decoded signal from said first adder and the motion vector, and said second local decoder comprises a second dequantizer for dequantizing the second quantized motion compensation prediction error signal from said second quantizer, and outputting a second output signal, a second adder for adding the second output signal from said second dequantizer and the second transform coefficient and outputting a second local decoded signal, and a second motion compensation prediction circuit for obtaining the second transform coefficient on the basis of the second local decoded signal from said second adder and the motion vector.
 5. A video encoding apparatus comprising: an orthogonal transform circuit for dividing an input video signal into a plurality of blocks each containing N×N pixels and orthogonally transforming the input video signal in units of blocks to obtain a plurality of transform coefficients divided in spacial frequency bands; a first motion prediction processing section for performing motion compensation prediction processing for the plurality of transform coefficients in order to obtain an upper-layer motion compensation prediction signal having the number of data enough to obtain a high image quality; a second motion prediction processing section for performing motion compensation prediction processing for the plurality of transform coefficients in order to obtain a lower-layer motion compensation prediction signal upon reducing the number of data; a decision section for deciding in motion compensation on the basis of the lower-layer motion compensation prediction signal whether motion compensation prediction is correct; a selector for selecting the upper-layer motion compensation prediction signal in response to a decision representing a correct motion compensation prediction from said decision section, and the lower-layer motion compensation prediction signal in response to a decision representing an incorrect motion compensation prediction; and an encoder for encoding one of the upper-layer motion compensation prediction signal and the lower-layer motion compensation prediction signal which is selected by said selector.
 6. A video encoding apparatus for realizing SNR scalability in M layers, comprising: an orthogonal transform circuit for dividing an input video signal into a plurality of blocks each containing N×N pixels and orthogonally transforming the input video signal in units of blocks to obtain a plurality of transform coefficients divided in spacial frequency bands; a first motion compensation prediction processing section for performing motion compensation prediction processing for the plurality of transform coefficients in order to obtain an mth-layer (m=2 to M) motion compensation prediction signal; a second motion compensation prediction processing section for performing motion compensation prediction processing for the plurality of transform coefficients in order to obtain an (m−1)th-layer motion compensation prediction signal; switching means for selecting the mth-layer motion compensation prediction signal of said first motion compensation prediction processing section in order to obtain an mth-layer prediction value when a quantized output from said second motion compensation prediction processing section is 0, and switching between the mth-layer motion compensation prediction signal and the (m−1)th-layer motion compensation prediction signal in units of transform coefficients in order to select the (m−1)th-layer motion compensation prediction signal when the quantized output is not less than 1; means for calculating a difference signal between an (m−1)th-layer dequantized output from said second motion compensation prediction processing section and an mth-layer motion compensation prediction error signal obtained by a difference between the mth-layer motion compensation prediction signal and the transform coefficient from said orthogonal transform circuit; and encoding means for quantizing and encoding the difference signal to output an encoded bit stream.
 7. An apparatus according to claim 6, wherein said switching means comprises means for switching an mth-layer (m=2 to M) quantization matrix between a transform coefficient corresponding to a quantized output of zero in the (m−1)th layer and a transform coefficient corresponding to a quantized output of not less than
 1. 8. An apparatus according to claim 6, further comprising means for, when quantized values of two-dimensional orthogonal transform coefficients in the mth layer (m=2 to M) are to be arranged into a one-dimensional series, arranging a transform coefficient corresponding to a quantized output of not less than 1 in the (m−1)th layer and then a transform coefficient corresponding to a quantized output of 0 in the (m−1)th layer in an order named.
 9. An apparatus according to claim 6, wherein said orthogonal transform circuit comprises means for transforming an arbitrary-shape picture into a transform coefficient in accordance with an alpha-map signal for discriminating a background of an input picture from an object thereof, said encoding means comprises means for encoding the alpha-map signal, said first motion compensation prediction processing section comprises means for inversely transforming the transform coefficient in accordance with the encoded alpha-map signal to reconstruct the arbitrary-shape picture.
 10. A video encoding/decoding system comprising: a video encoding apparatus for realizing SNR (Signal to Noise Ratio) scalability in M layers, which includes, an orthogonal transform circuit for dividing an input video signal into a plurality of blocks each containing N×N pixels and orthogonally transforming the input video signal in units of blocks to obtain a plurality of transform coefficients divided in spacial frequency bands, a first motion compensation prediction processing section for performing motion compensation prediction processing for the plurality of transform coefficients in order to obtain an mth-layer (m=2 to M) motion compensation prediction signal, a second motion compensation prediction processing section for performing motion compensation prediction processing for the plurality of transform coefficients in order to obtain an (m−1)th-layer motion compensation prediction signal, switching means for selecting the mth-layer motion compensation prediction signal of said first motion compensation prediction processing section in order to obtain an mth-layer prediction value when a quantized output from said second motion compensation prediction processing section is 0, and switching between the mth-layer motion compensation prediction signal and the (m−1)th-layer motion compensation prediction signal in units of transform coefficients in order to select the (m−1)th-layer motion compensation prediction signal when the quantized output is not less than 1, means for calculating a difference signal between an (m−1)th-layer dequantized output from said second motion compensation prediction processing section and an mth-layer motion compensation prediction error signal obtained by a difference between the mth-layer motion compensation prediction signal and the transform coefficient from said orthogonal transform circuit, and encoding means for quantizing and encoding the difference signal to output an encoded bit stream; and a video decoding apparatus which includes, means for extracting codes up to a code in the mth (m=2 to M) layer from the encoded bit stream from said video encoding apparatus, decoding means for decoding she codes of respective layers up to the mth layer, dequantization means for dequantizing, in the respective layers, the quantized values decoded by said decoding means, switching means for switching the mth-layer (m=2 to M) motion compensation prediction value and the (m−1)th-layer motion compensation prediction value in units of transform coefficients, and outputting the mth-layer motion compensation prediction value for the quantized output of 0 in the (m−1)th layer and the (m−1)th-layer motion compensation prediction value for the quantized output of not less than 1 in the (m−1)th layer in units of transform coefficients in order to obtain the mth-layer prediction value, and means for adding the mth-layer motion compensation prediction value and the (m−1)th-layer motion compensation prediction value to reconstruct the mth-layer motion compensation prediction error signal.
 11. A system according to claim 10, further comprising switching means for switching an mth-layer (m=2 to M) quantization matrix between a transform coefficient corresponding to a quantized output of zero in the (m−1)th layer and a transform coefficient corresponding to a quantized output of not less than
 1. 12. A system according to claim 10, wherein said decoding means comprises means for decoding an alpha-map signal for discriminating a background of an input picture from an object thereof, and means for inversely transforming the arbitrary-shape picture transformed into the transform coefficient in accordance with the encoded alpha-map signal to reconstruct the arbitrary-shape picture.
 13. A video encoding apparatus comprising: an orthogonal transform circuit for dividing an input video signal into a plurality of blocks each containing N×N pixels and orthogonally transforming an arbitrary-shape picture in units of blocks in accordance with an alpha-map signal for discriminating a background of an input picture from at least one object thereof to obtain a plurality of transform coefficients; a first motion compensation prediction processing section having frame memories respectively corresponding to the background and at least one object, means for inversely transforming the transform coefficient in accordance with the alpha-map signal to reconstruct the arbitrary-shape picture, and means for performing motion compensation prediction processing for the plurality of transform coefficients, said first motion compensation prediction processing section being adapted to obtain an upper-layer motion compensation prediction signal having the number of data enough to obtain a high image quality; a second motion compensation prediction processing section having frame memories respectively corresponding to the background and at least one object, means for inversely transforming the transform coefficient in accordance with the alpha-map signal to reconstruct the arbitrary-shape picture, and means for performing motion compensation prediction processing for the plurality of transform coefficients, said second motion compensation prediction processing section being adapted to obtain an lower-layer motion compensation prediction signal upon reducing the number of data; a decision section for deciding in motion compensation on the basis of the lower motion compensation prediction signal whether motion compensation is correct; a selector for selecting the upper-layer motion compensation prediction signal in response to a correct motion compensation prediction from said decision section, and the lower-layer motion compensation prediction signal in response to an incorrect motion compensation prediction; and an encoder for encoding a motion compensation prediction value selected by said selector.
 14. An apparatus according to claim 13, which includes means for detecting a motion vector for each object and the background in a block containing a plurality of objects or the background, and a motion vector detection range in the block containing the plurality of objects or the background is narrower than that in a block containing one object or the background.
 15. An apparatus according to claim 13, further comprising motion vector detection means for detecting a motion vector in units of objects and performing motion vector search operation in the same object.
 16. A video encoding apparatus comprising: an orthogonal transform circuit for dividing an input video signal into a plurality of blocks each containing N×N pixels and orthogonally transforming an arbitrary-shape picture in units of blocks to obtain a plurality of transform coefficients; means for encoding and outputting an alpha-map signal for discriminating a background of a picture from an object thereof; means for calculating an average value of pixel values of an object portion using the alpha-map signal in units of blocks; means for assigning the average value to a background portion of the block; means for deciding using the alpha-map signal whether a pixel in the object is close to the background; means for compressing, about the average value, the pixel in the object decided to be close to the background; and means for orthogonally transforming each block to output an orthogonal transform coefficient.
 17. A video encoding/decoding system comprising: a video encoding which includes, an orthogonal transform circuit for dividing an input video signal into a plurality of blocks each consisting of N×N pixels and orthogonally transforming an arbitrary-shape picture in units of blocks to obtain a plurality of transform coefficients, means for encoding and outputting an alpha-map signal for discriminating a background of a picture from an object thereof, means for calculating an average value of pixel values of an object portion using the alpha-map signal in units of blocks, means for assigning the average value to a background portion of the block, means for deciding using the alpha-map signal whether a pixel in the object is close to the background, means for compressing, about the average value, the pixel in the object decided to be close to the background, and means for orthogonally transforming each block to output an orthogonal transform coefficient; and a video decoding apparatus which includes, means for decoding the alpha-map signal encoded by said video encoding apparatus, means for decoding a block from the orthogonal transform coefficient, means for calculating an average value of the object portion, the background portion, or the entire blocs, means for deciding using the alpha-map signal whether the pixel in the object is close to the background, and means for decompressing, about the average value, the pixel in the object decided to be close to the background by said deciding means.
 18. A video encoding apparatus comprising: an orthogonal transform circuit for dividing an input video signal into a plurality of blocks each containing N×N pixels and orthogonally transforming an arbitrary-shape picture in units of blocks to obtain a plurality of transform coefficients; means for encoding and outputting an alpha-map signal for discriminating a background of a picture from an object thereof; means for calculating an average value of an object portion in units of blocks for the picture, using the alpha-map signal; means assigning the average value obtained by said means for calculating the average value to a background portion of the block; means for deciding using the alpha-map signal whether a pixel in the background is close to the object; means for correcting the pixel in the background which is decided to be close to the object as a decision result of said deciding means in such a manner that a pixel value of the pixel comes close to a pixel value of the object near the pixel; and means for outputting an orthogonal transform coefficient obtained by orthogonally transforming the block. 